通达信【破茧成蝶】主图选股指标 抓住关键的转折点 用法详解 源码



HGW1:=CLOSE=ZTPRICE(REF(CLOSE,1),0.1);
HGW2:=HIGH=ZTPRICE(REF(CLOSE,1),0.1) AND CLOSE<HIGH;
HGW3:=CLOSE=ZTPRICE(REF(CLOSE,1),0.2);
HGW4:=HIGH=ZTPRICE(REF(CLOSE,1),0.2) AND CLOSE<HIGH;
HGW5:=BARSLAST(CLOSE=LLV(CLOSE,60));
HGW6:=BETWEEN(HGW5,1,60) AND CLOSE/REF(CLOSE,1)>1.043;
HGW7:=HGW6 AND COUNT(HGW6,HGW5)=1;
HGW8:=BARSLAST(CLOSE=LLV(CLOSE,BARSLAST(HGW7)));
HGW9:=HGW8=1 AND CLOSE>REF(CLOSE,HGW8) AND HIGH>LOW;
HGW10:=STRCAT(HYBLOCK,' ');
HGW11:=STRCAT(HGW10,DYBLOCK);
HGW12:=STRCAT(HGW11,' ');
HGW13:=BARSLAST(COUNT(HGW9,BARSLAST(HGW7))=1 AND HGW9);
HGW14:=BARSLAST(COUNT(HGW9,BARSLAST(HGW7))=2 AND HGW9);
HGW15:=BARSLAST(COUNT(HGW9,BARSLAST(HGW7))=3 AND HGW9);
HGW16:=COUNT(HGW9,BARSLAST(HGW7))>3;
HGW17:=MAX(REF(CLOSE,HGW13),REF(CLOSE,HGW14));
HGW18:=MAX(HGW17,REF(CLOSE,HGW15));
HGW19:=IF(COUNT(HGW9,BARSLAST(HGW7))=1,REF(CLOSE,HGW13),0);
HGW20:=IF(COUNT(HGW9,BARSLAST(HGW7))=2,HGW17,0);
HGW21:=IF(COUNT(HGW9,BARSLAST(HGW7))=3,HGW18,0);
STICKLINE(HGW1,CLOSE,OPEN,2,0),COLORYELLOW;
STICKLINE(HGW2,CLOSE,OPEN,2,0),COLORMAGENTA;
STICKLINE(HGW3,CLOSE,OPEN,2,0),COLORRED;
STICKLINE(HGW4,CLOSE,OPEN,2,0),COLORWHITE;
STICKLINE(HGW7,HIGH*1.1,LOW*0.9,0.3,1);
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(HGW12,GNBLOCK)),COLORRED;
地平线:CONST(HGW19+HGW20+HGW21),COLORMAGENTA;
HGW22:=CLOSE>=地平线 AND CLOSE/REF(CLOSE,1)>1.043;
HGW23:=COUNT(HGW22,BARSLAST(HGW7))=1 AND HGW22;
VAR28:=CONST(REF(CLOSE,BARSLAST(HGW23)));
VAR29:=IF(HGW16 OR BARSLAST(HGW23)>BARSLAST(HGW7),0,VAR28);
DRAWTEXT(HGW23,1.03*HIGH,'破茧成蝶'),COLORYELLOW;
DRAWTEXT(BARSLASTCOUNT(HGW16)=1,0.97*LOW,'作茧自缚'),COLORWHITE;
DRAWICON(HGW23,0.99*LOW,29);
DRAWICON(BARSLASTCOUNT(HGW16)=1,LOW,9);
起飞线:CONST(VAR29),COLORGREEN;



来函数检测结果如下:
该公式没有未来函数

解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图