手机版 官方微博
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮忙优化下这个打板资金副图源码

[通达信]
设置
1465 1 山争哥哥 Lv.2 发表于 · 2020-6-30 22:50 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
本帖最后由 山争哥哥 于 2020-6-30 23:01 编辑

请老师帮忙改下这个资金副图源码,文件有点乱码了。谢谢!

原图是图一这样

导入文件后生成是图二这样,成了乱码的了,改好后也可以直接生成tn6文件格式传出来也行,这样导入文件格式就不怕乱码了,谢谢

VAR1S:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
VAR2S:=REF(EMA(VAR1S,3),1);
VAR3S:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR4S:=IF(CLOSE>OPEN,VAR3S*(HIGH-LOW),IF(CLOSE<OPEN,VAR3S*(HIGH-OPEN+(CLOSE-LOW)),VOL/2))+IF(CLOSE>OPEN,0-VAR3S*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR3S*(HIGH-LOW),0-VOL/2));
VAR5S:=VOL/CAPITAL;
VAR6S:=IF(VAR5S>10,10,VAR5S);
VAR7S:=VAR4S/20/1.15;
VAR8S:=VAR7S*0.55+REF(VAR7S,1)*0.33+REF(VAR7S,2)*0.22;
VAR9S:=EMA(VAR8S,8);
VAR10S:=EMA(VAR8S,3);
STICKLINE(VAR7S*0.4>=0,VAR7S*0.4+VAR10S,0,3,0),COLORYELLOW;
STICKLINE(VAR7S*0.4<0,VAR7S*0.4+VAR10S,0,3,0),COLORGREEN;
VAR11S:=IF(VAR7S*0.4+VAR10S>0,VAR7S*0.4+VAR10S,DRAWNULL);
VAR12S:=IF(VAR7S*0.4+VAR10S<0,VAR7S*0.4+VAR10S,DRAWNULL);
VAR13S:=VAR7S*0.4+VAR10S;
VAR14S:=AMOUNT/10000;
资金净进出:IF(VAR7S*0.4+VAR10S>0,VAR11S,VAR12S),POINTDOT,COLORWHITE;
进出比例%:IF(VAR7S*0.4+VAR10S>0,VAR11S/VAR14S*100,VAR12S/VAR14S*100),COLORYELLOW;
VAR15S:=VAR10S;
STICKLINE(VAR15S>0,VAR15S,0,3,0),COLORRED;
STICKLINE(VAR15S<0,VAR15S,0,3,0),COLORFF3300;
VARS16:=REF(VAR12S,1)<0 AND VAR11S>30 AND CLOSE>OPEN AND CLOSE>REF(CLOSE,1) AND CLOSE>MA(CLOSE,3);
VARS17:=(3*CLOSE+2*LOW+OPEN+HIGH)/7;
VARS18:=(20*VARS17+19*REF(VARS17,1)+18*REF(VARS17,2)+17*REF(VARS17,3)+16*REF(VARS17,4)+15*REF(VARS17,5)+14*REF(VARS17,6)+13*REF(VARS17,7)+12*REF(VARS17,8)+11*REF(VARS17,9)+10*REF(VARS17,10)+9*REF(VARS17,11)+8*REF(VARS17,12)+7*REF(VARS17,13)+6*REF(VARS17,14)+5*REF(VARS17,15)+4*REF(VARS17,16)+3*REF(VARS17,17)+2*REF(VARS17,18)+REF(VARS17,20))/210;
VARS19:=VAR11S>300 AND CROSS(CLOSE,VARS18);
DRAWTEXT(VARS16,(-30),13),COLORMAGENTA;
DRAWTEXT(VARS19,VAR7S*0.4*1.5*1.4,13),COLORRED;

附件

图一

图一

图二

图二

举报

扔鸡蛋(0) 回复

休闲者68
Lv.6
发表于 2020-7-1 07:28 复制 查看全部楼层
{没有乱码现象}
VAR1S:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
VAR2S:=REF(EMA(VAR1S,3),1);
VAR3S:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR4S:=IF(CLOSE>OPEN,VAR3S*(HIGH-LOW),IF(CLOSE<OPEN,VAR3S*(HIGH-OPEN+(CLOSE-LOW)),VOL/2))+IF(CLOSE>OPEN,0-VAR3S*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR3S*(HIGH-LOW),0-VOL/2));
VAR5S:=VOL/CAPITAL;
VAR6S:=IF(VAR5S>10,10,VAR5S);
VAR7S:=VAR4S/20/1.15;
VAR8S:=VAR7S*0.55+REF(VAR7S,1)*0.33+REF(VAR7S,2)*0.22;
VAR9S:=EMA(VAR8S,8);
VAR10S:=EMA(VAR8S,3);
STICKLINE(VAR7S*0.4>=0,VAR7S*0.4+VAR10S,0,3,0),COLORYELLOW;
STICKLINE(VAR7S*0.4<0,VAR7S*0.4+VAR10S,0,3,0),COLORGREEN;
VAR11S:=IF(VAR7S*0.4+VAR10S>0,VAR7S*0.4+VAR10S,DRAWNULL);
VAR12S:=IF(VAR7S*0.4+VAR10S<0,VAR7S*0.4+VAR10S,DRAWNULL);
VAR13S:=VAR7S*0.4+VAR10S;
VAR14S:=AMOUNT/10000;
资金净进出:IF(VAR7S*0.4+VAR10S>0,VAR11S,VAR12S),POINTDOT,COLORWHITE;
进出比例%:IF(VAR7S*0.4+VAR10S>0,VAR11S/VAR14S*100,VAR12S/VAR14S*100),COLORYELLOW;
VAR15S:=VAR10S;
STICKLINE(VAR15S>0,VAR15S,0,3,0),COLORRED;
STICKLINE(VAR15S<0,VAR15S,0,3,0),COLORFF3300;
VARS16:=REF(VAR12S,1)<0 AND VAR11S>30 AND CLOSE>OPEN AND CLOSE>REF(CLOSE,1) AND CLOSE>MA(CLOSE,3);
VARS17:=(3*CLOSE+2*LOW+OPEN+HIGH)/7;
VARS18:=(20*VARS17+19*REF(VARS17,1)+18*REF(VARS17,2)+17*REF(VARS17,3)+16*REF(VARS17,4)+15*REF(VARS17,5)+14*REF(VARS17,6)+13*REF(VARS17,7)+12*REF(VARS17,8)+11*REF(VARS17,9)+10*REF(VARS17,10)+9*REF(VARS17,11)+8*REF(VARS17,12)+7*REF(VARS17,13)+6*REF(VARS17,14)+5*REF(VARS17,15)+4*REF(VARS17,16)+3*REF(VARS17,17)+2*REF(VARS17,18)+REF(VARS17,20))/210;
VARS19:=VAR11S>300 AND CROSS(CLOSE,VARS18);
DRAWTEXT(VARS16,(-30),13),COLORMAGENTA;
DRAWTEXT(VARS19,VAR7S*0.4*1.5*1.4,13),COLORRED;

2020-07-01_072838.png
查看全部打赏
  • 福阿德+8理想币 +7共享币 : 理想精神:分享,互助,友善,传递正能量!

举报

点亮(1) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表