顺势而为47 发表于 2023-9-20 22:40:12

分享一个通达信主图指标公式(标志性K线)!

<p data-first-child >这个是通达信主图指标,手机已测,电脑大家自己试试</p><p ><br/>主图指标源码:</p><p >影响时长:=60;</p><p >实体涨跌幅:=(MAX(CLOSE,OPEN)/MIN(CLOSE,OPEN)-1)*100,NODRAW;</p><p >标志性K线:IFF(实体涨跌幅==HHV(实体涨跌幅,影响时长),1,0),NODRAW,COLORYELLOW;</p><p >影响时间:=BARSLAST(标志性K线)+1,NODRAW;</p><p >上轨:IFF(BETWEEN(影响时间,1,影响时长),REF(HIGH,影响时间-1),DRAWNULL),NODRAW,COLORRED;</p><p >下轨:IFF(BETWEEN(影响时间,1,影响时长),REF(LOW ,影响时间-1),DRAWNULL),NODRAW,COLORGREEN;</p><p >冗余过滤:=BETWEEN(影响时间,2,59),NODRAW;</p><p >STICKLINE(上轨,上轨,上轨,12,0),COLORRED;</p><p >STICKLINE(下轨,下轨,下轨,12,0),COLORGREEN;</p><p >STICKLINE(标志性K线 AND CLOSE>OPEN,CLOSE,OPEN,8,0),COLORRED;</p><p >STICKLINE(标志性K线 AND CLOSE<OPEN,CLOSE,OPEN,8,0),COLORGREEN;</p><p >A_1:=CROSS(C,上轨) AND REF(CLOSE,影响时间-1)>REF(OPEN,影响时间-1);</p><p >A_2:=COUNT(A_1,影响时间)==1 AND A_1;</p><p >一飞冲天:IFF(A_2 AND 影响时间!=1 AND 冗余过滤,1,DRAWNULL),NODRAW,COLORRED;</p><p >STICKLINE(一飞冲天,CLOSE,OPEN,8,0),COLORRED;</p><p >STICKLINE(一飞冲天,HIGH,LOW,0,0),COLORRED;</p><p >DRAWTEXT(一飞冲天,LOW,'B'),COLORYELLOW;</p><p >B_1:=CROSS(CLOSE,上轨) AND REF(CLOSE,影响时间-1)>REF(OPEN,影响时间-1);</p><p >B_2:=COUNT(B_1,影响时间)==2 AND B_1;</p><p >回首惊天:IFF(B_2 AND 影响时间!=1 AND 冗余过滤,1,DRAWNULL),NODRAW,COLORYELLOW;</p><p >STICKLINE(回首惊天,CLOSE,OPEN,8,0),COLORYELLOW;</p><p >STICKLINE(回首惊天,HIGH,LOW,0,0),COLORYELLOW;</p><p >DRAWTEXT(回首惊天,LOW,'B'),COLORMAGENTA;</p><p >C_1:=CROSS(CLOSE,下轨) AND REF(CLOSE,影响时间-1)>REF(OPEN,影响时间-1) AND COUNT(回首惊天,影响时间)==0;</p><p >C_2:=COUNT(C_1,影响时间)==1 AND C_1;</p><p >蓄势擎天:IFF(C_2 AND 影响时间!=1 AND 冗余过滤,1,DRAWNULL),NODRAW,COLORMAGENTA;</p><p >STICKLINE(蓄势擎天,CLOSE,OPEN,8,0),COLORMAGENTA;</p><p >STICKLINE(蓄势擎天,HIGH,LOW,0,0),COLORMAGENTA;</p><p >DRAWTEXT(蓄势擎天,LOW,'B'),COLORYELLOW;</p><p >D_1:=CROSS(下轨,CLOSE) AND REF(CLOSE,影响时间-1)<REF(OPEN,影响时间-1);</p><p >D_2:=COUNT(D_1,影响时间)==1 AND D_1;</p><p >飞流直下:IFF(D_2 AND 影响时间!=1 AND 冗余过滤,1,DRAWNULL),NODRAW,COLORGREEN;</p><p >STICKLINE(飞流直下,CLOSE,OPEN,8,0),COLORGREEN;</p><p >STICKLINE(飞流直下,HIGH,LOW,0,0),COLORGREEN;</p><p >DRAWTEXT(飞流直下,HIGH*1.01,'S'),COLORYELLOW;</p><p >E_1:=CROSS(下轨,CLOSE) AND REF(CLOSE,影响时间-1)<REF(OPEN,影响时间-1);</p><p >E_2:=COUNT(E_1,影响时间)==2 AND E_1;</p><p >回首再下:IFF(E_2 AND 影响时间!=1 AND 冗余过滤,1,DRAWNULL),NODRAW,COLORWHITE;</p><p >STICKLINE(回首再下,CLOSE,OPEN,8,0),COLORWHITE;</p><p >STICKLINE(回首再下,HIGH,LOW,0,0),COLORWHITE;</p><p >DRAWTEXT(回首再下,HIGH*1.01,'S'),COLORYELLOW;</p><p ><b>① 指标源码导入即可使用,但由于文章篇幅限制,股票和公式并未分享完整,如果对于指标有兴趣和疑问,亦或者若不能成功导入请与我沟通!</b></p><p ><b>②创作收集不易,恳请大家阅读之后,对于我的文章能关注和转发,帮忙加加人气,万分谢谢!</b></p><p></p>

本尊为猫飞 发表于 2024-1-3 01:49:04

thanks

好运哥 发表于 2024-3-28 14:47:37

爱你,么么哒,哈哈……
页: [1]
查看完整版本: 分享一个通达信主图指标公式(标志性K线)!