以下是通达信天一神鞭主图源码指标公式(主图附图贴图)(无源码的请下载附件导入)
动态止损度:=5;
黑:=0;{下跌通道黑色K线开关}
离L:=0;{乖离提示开关}
提示:=0;{买卖文字提示开关}
布林M:=0;{开关}
MMA:=0;
五:MA(CLOSE,5),COLORWHITE;
十:MA(CLOSE,10),COLOR00FFFF;
M18:=MA(CLOSE,18),COLORRED;
离基:=五;
离O:=离基*1.20,COLOR555555;
离A:离基*1.15,COLOR555555;
离B:离基*1.10,COLOR555555;
离C:离基*0.90,COLOR555555;
离D:=离基*0.85,COLOR333333;
EXP50:=EXPMA(CLOSE,50),COLORGREEN;
MA30:MA(CLOSE,30),LINETHICK1,COLORRED;
MA60:MA(CLOSE,60),COLORGREEN;
β0:=(H-L)/2+L,LINETHICK0;
α:=β0,LINETHICK0;
β:=REF(β0,1),LINETHICK0,COLORGREEN;
γ:=REF(β0,2),LINETHICK0,COLORMAGENTA;
{涨:PLOYLINE(C>REF(C,1),CONST(C)),COLOR0000AA,LINETHICK1;
跌:PLOYLINE(C<REF(C,1),CONST(C)),COLOR00AA00,LINETHICK1;}
高:PLOYLINE(1,CONST(HHV(H,50))),COLOR770077,LINETHICK1;
低:=PLOYLINE(1,CONST(LLV(L,50))),COLOR777700,LINETHICK1;
中:=PLOYLINE(1,(高-低)/2+低),COLOR005555,LINETHICK4;
止损价:=CONST(HHV(C,5)*(100-动态止损度)/100);
止:PLOYLINE(CONST(C)<=止损价,止损价),COLOR888800,LINETHICK4;
DRAWTEXT(DYNAINFO(7)<=止损价 AND ISLASTBAR,止损价*1.05,'止损');
AA:=CLOSE/REF(C,1)>=1.09;
BA:=CLOSE/REF(C,1)>=1.09;
DRAWKLINE(H,O,L,C);
STICKLINE(AA,O,C,2.5,1),COLORYELLOW;
MA1:=MA(CLOSE,5),COLORRED;
MA2:=MA(CLOSE,10),COLORYELLOW;
MA3:=MA(CLOSE,20),COLOR770077;
E50:=EXPMA(CLOSE,50),LINETHICK1,POINTDOT,COLORLIGREEN;
E100:=EXPMA(CLOSE,100),POINTDOT,COLORGRAY;
MA181:MA(C,181),COLORGRAY;
{MA60:=MA(C,60),COLOR007700;}
{周:IF( MMA=1 ,MA2,DRAWNULL),COLORYELLOW,LINETHICK1;
月:IF( MMA=1 ,MA3,DRAWNULL),COLORWHITE,LINETHICK1;
季:IF( MMA=1 ,MA4,DRAWNULL),COLORGREEN,LINETHICK1;}
{IF(C>E50 ,E50,DRAWNULL),COLOR00FF00,LINETHICK1;}
IF(CONST(α>β) AND DYNAINFO(7)>0,DYNAINFO(7),DRAWNULL),COLOR000088,LINETHICK1;
IF(CONST(α<=β)AND DYNAINFO(7)>0 ,DYNAINFO(7),DRAWNULL),COLOR008800,LINETHICK1;
IF(CONST(α>β) AND DYNAINFO(7)>0 AND DYNAINFO(7)>=高*0.99,DYNAINFO(7),DRAWNULL),COLOR000088,LINETHICK1;
IF(CONST(α<=β)AND DYNAINFO(7)>0 AND DYNAINFO(7)<=低*1.01 ,DYNAINFO(7),DRAWNULL),COLOR008800,LINETHICK1;
N1:=12;
N2:=26;
N3:=9;
DIFF:=(EMA(CLOSE,N1) - EMA(CLOSE,N2));
DEA:=EMA(DIFF,N3);
MACD:=(2 * (DIFF - DEA));
MACD2:=MACD;
SARH:=CLOSE>SAR(4,2,20);
621399965.jpg
|