机构操盘线V4指标 公式 源码[通达信公式]
指标公式源码分析及使用说明:
源码:
{程序化交易 www.cxh99.com }
限时日:=1991231;限时:=IF(DATE<限时日,1,0);AA9:=C;AAA:=REF(C,2),COLORGREEN;AAA2:=MA(C,5);AAA3:=MA(C,26);AAA1:=MA((3*H+C)/4,2),COLORLICYAN;NOTEXT1:=FORCAST(EMA(AAA,1),7),COLORGREEN;短趋势:FORCAST(EMA(AA9,16),7)*限时,COLOR00FF00,LINETHICK3;中趋势:FORCAST(EMA(AA9,55),7)*限时,DOTLINE,COLORFFFF00;NOTEXT5:IF(AAA2>短趋势 OR C>短趋势,短趋势,DRAWNULL)*限时,COLORRED,LINETHICK3;NOTEXT6:IF(短趋势>=中趋势,中趋势,DRAWNULL)*限时,DOTLINE,COLOR0000FF;ZJC1:=AAA2>短趋势 OR C>短趋势;ZJC2:=短趋势>=中趋势;ZJC3:=ZJC1 AND ZJC2;{黄金坑}T1:=BARSLAST(L=LLV(L,13));T2:=BARSLAST(CROSS(短趋势,中趋势));X1:=C/REF(C,急涨周期)-1>=急涨幅度/100 ;X2:=REF(C,底部周期+急涨周期+急跌周期)/REF(C,急涨周期+底部周期)-1<=急跌幅度/100 AND BARSCOUNT(C)>60;黄金坑:(X1 AND X2)*限时,COLORMAGENTA,NODRAW;D:=FILTER(黄金坑,10);STICKLINE(黄金坑 AND D,O,C,3.5,1),COLORMAGENTA;DRAWTEXT(黄金坑 AND D,L*0.98,'黄金坑')*限时,COLORMAGENTA;{起爆}MA89:=MA(CLOSE,13);MA144:=MA(CLOSE,21);MA233:=MA(CLOSE,34);MA377:=MA(CLOSE,55);上穿:=CROSS(C,MA377)+CROSS(C,MA89)+CROSS(C,MA144)+CROSS(C,MA233);起爆:(C>O AND 上穿>2 ANDC/REF(C,1)-1>0.049 AND C/REF(C,1)-1<0.097 ANDC>MAX(MA89,MAX(MA144,MAX(MA233,MA377))))*限时AND C>MAX(MA(C,144),MA(C,233)),NODRAW,COLORWHITE;STICKLINE(起爆,O,C,3,0)*限时,COLORWHITE;DRAWTEXT(起爆,H*1.01,'起爆')*限时,COLORWHITE;{飞龙在天}B:=C/REF(C,1)-1>涨幅/100;D8:=C/中趋势-1<距离/100;X:=BARSCOUNT(C);X8:=C>=HHV(C,X);飞龙在天:(X8 AND B AND D8 AND BARSCOUNT(C)>100)*限时,NODRAW,COLORLIMAGENTA;STICKLINE(飞龙在天,O,C,3,0),COLORLIMAGENTA;DRAWTEXT(飞龙在天,H*1.05,'飞龙在天'),COLORLIMAGENTA;{抓板}ZB:=(ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 && CLOSE/OPEN>1.03 && CLOSE>REF(CLOSE,2) AND C/REF(C,1)>1.0572)*限时;DRAWTEXT(ZB AND ZJC3 ,L*0.95,'抓板')*限时,COLORYELLOW;抓板:(ZB AND ZJC3)*限时,NODRAW,COLOR00FFFF;STICKLINE(ZB AND ZJC3 ,REF(C,1)*1.05,C,2,0)*限时,COLORYELLOW;STICKLINE(ZB AND ZJC3 , O , REF(C,1)*1.05,2,0)*限时,COLORRED;DRAWTEXT((CROSS(DATE,限时日) OR DATE=限时日) AND 限时=0 ,H*1.01,'本指标已过时效'),COLOR00FFFF;DRAWTEXT_FIX(ISLASTBAR,0.3,0,0,HYBLOCK),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,DYBLOCK),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,GNBLOCK),COLORYELLOW;下下分型:=L<REF(LLV(L,3),1) AND REFX(LOW,1)>L AND IF(REFX(HIGH,1)>H,1,REFX(LOW,2)>L AND IF(REFX(HIGH,2)>REFX(HIGH,1),1,REFX(LOW,3)>L AND IF(REFX(HIGH,3)>REFX(HIGH,2),1,REFX(LOW,4)>L AND REFX(HIGH,4)>REFX(HIGH,3))));上上分型:=H>REF(HHV(H,3),1) AND REFX(HIGH,1)<H AND IF(REFX(LOW,1)<L,1,REFX(HIGH,2)<H AND IF(REFX(LOW,2)<REFX(LOW,1),1,REFX(HIGH,3)<H AND IF(REFX(LOW,3)<REFX(LOW,2),1,REFX(HIGH,4)<H AND REFX(LOW,4)<REFX(LOW,3))));下分型:=IF(DATE<1991011,下下分型,0);上分型:=IF(DATE<1991011,上上分型,0);DRAWICON(下分型 AND REF(NOT(上分型),1),L,1);DRAWICON(上分型 AND REF(NOT(下分型),1),H,2);
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容