通达信独醉天下主图(思路分析)分时主图 源码
接下来呢,看到那图有红色上升箭头和绿色下降箭头还有一个雄鹰了么?
这里呢,就要用到那段臭名昭著未来函数 ZIG了。于是,代码就出来了
DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,9) ;
DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,4);
这里的9和4分别是对应的图标,因为那是上下的箭头,所以我们改成1和2
DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,1) ;
DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,2);
然后,拿指标里,还有一个雄鹰吧?雄鹰是在红色箭头下面的,那就简单了。把1改成雄鹰,那就好了。当然了,为了不挡住红色箭头。把LOW后面的数值改一下,可以是0.95什么的,因为这个是位置。不影响。
DRAWTEXT((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.95,"雄鹰"),COLORBROWN;
然后,独醉天下的主图里还有什么诸如【世纪大底】【接近底部】【雄鹰展翅】等等的提示。其实,道理就和我上面举的两个例子是一样的。我们只要在搜索一下这相关的文字,然后加上去,注意代码的修改和调整,独醉天下的主图就出来了。
感兴趣的朋友,可以自己添加一些喜欢的指标进去。
好了,看到有人求独醉分时主图,刚好之前在网上找到有不加密的,还有不知道是本人的原因还是论坛的原因,文件尺寸: 小于 0.001 kb ,附件什么的也没办法上传,就直接来个源码发上来好了。
独醉分时主图
源码
量价:=(VOL/CLOSE)/3;
A2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);
A3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);
A6:=A2+A3;DD1:=1;比:=A2/A3;
AAA1:=STRCAT(STRCAT("买= ",CON2STR((100*A2)/A6,0)),"%");
AAA2:=STRCAT(STRCAT("卖= ",CON2STR((100*A3)/A6,0)),"%");
AAA3:=STRCAT(STRCAT("差= ",CON2STR((100*(A2-A3))/A6,0)),"%");
DRAWTEXT_FIX(DD1=1,0,0.04,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0,0.12,0,AAA2),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0,0.20,0,AAA3),COLOR00FFFF;
DRAWTEXT_FIX(比>2,0,0.40,0,"涨"),COLORCYAN;
DRAWTEXT_FIX(比>2,0,0.48,0,"停"),COLORMAGENTA;
DRAWTEXT_FIX(比>2,0,0.56,0,"板"),COLORRED;
中期线:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100;
DRAWTEXT(比<1.1,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORGREEN;
DRAWTEXT(比>1.5,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORCYAN;
DRAWTEXT(比>2,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORMAGENTA;
DRAWTEXT(比>2.5,(DYNAINFO(5)+DYNAINFO(6))/2,"○"),COLORRED;
DRAWTEXT((比>1.1 AND 中期线<5),(DYNAINFO(5)+DYNAINFO(6))/2,"●"),COLORWHITE;
DRAWTEXT((比<1.1 AND 中期线>98.0),(DYNAINFO(5)+DYNAINFO(6))/2,"●"),COLORWHITE;
DRAWTEXT((比>1.1 AND 中期线<5),C,"-买"),COLORYELLOW;
DRAWTEXT((比<1.1 AND 中期线>98.0),C,"-卖"),COLORYELLOW;
均价:=SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
TT:=BARSCOUNT(C);均:=MA(C,TT);
上均线:=均+2*STD(C,3);下均线:=均-2*STD(C,3);
时长:=TIME>93000;涨幅:=C/REF(C,1)>1.02;跌幅:=C/REF(C,1)<0.98;
横盘:=((HHV(C,TT)-LLV(C,TT))/C)<0.05;YY:=SMA(VOL,30,1);
放量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.95;
涨跌幅:=涨幅 OR 跌幅;
横涨1:=涨跌幅=0 AND 横盘 AND 放量 AND CROSS(均价,均);
DRAWTEXT(FILTER(横涨1,10),均价,"--突破"),COLORCYAN;
DRAWICON(FILTER(横涨1,10),均价,1);
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);
底:=1;1.02,NODRAW;高:=1.03;
AA:=主力>大户 AND 主力>1.003 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60);
DRAWICON(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C,25);
DRAWTEXT(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C*0.999,"-主力"),COLORYELLOW;
DRAWICON(CROSS(主力,1.02),C,26);
DRAWTEXT(CROSS(主力,1.02),C*0.999,"-拉升"),COLORCYAN;
DRAWICON(CROSS(主力,1.04),C,24);
DRAWTEXT(CROSS(主力,1.04),C*0.999,"-冲涨停"),COLORLIMAGENTA;
DRAWICON(CROSS(散户,主力),C,6);
DRAWTEXT(CROSS(散户,主力),C*0.9995,"-小心"),COLORGREEN;
DRAWICON(CROSS(散户,大户),C,6);
DRAWTEXT(CROSS(散户,大户),C*0.9995,"-走弱"),COLORGREEN;
好了,就到这里了,希望能给那些找不到指标的朋友,一些帮助。同时,也感谢独醉天下老师给提供了一个怎么去弄适合自己指标的思路。
- 上一篇公式:通达信四条资金指标(超、大、中、散)幅图源码
- 下一篇公式:通达信绝杀主力DDE副图指标