【通达信分享源码】精品指标公式-金牛给力主图指标源码
公式源码:
M1:EMA(CLOSE,3),COLORAA00AA;
M2:EMA(CLOSE,5),COLORBB00BB;
M3:EMA(CLOSE,8),COLORCC00CC;
M4:EMA(CLOSE,10),COLORDD00DD;
M5:EMA(CLOSE,12),COLOREE00EE;
M6:EMA(CLOSE,15),COLORFF00FF;
M7:EMA(CLOSE,30),COLOR005500;
M8:EMA(CLOSE,35),COLOR006600;
M9:EMA(CLOSE,40),COLOR007700;
M10:EMA(CLOSE,45),COLOR008800;
MA11:EMA(CLOSE,50),COLOR009900;
MA12:EMA(CLOSE,60),COLOR00FF00;
获利盘90均线:MA(COST(90),N);
获利盘50均线:MA(COST(50),N);
获利盘30均线:MA(COST(30),N);
获利盘10均线:MA(COST(10),N);
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
BT:=(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND
REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
DRAWTEXT(BT,C*0.97,'短牛'),COLORFFFFFF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
DRAWTEXT(TJ1,C*0.94,'中牛'),COLORMAGENTA;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
DRAWTEXT(TJ2,L*0.93,'大牛'),COLORYELLOW;
ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);
DRAWTEXT(ST,H*1.02,'卖'),COLOR00FF00;
DRAWICON(BT AND TJ1 AND TJ2,L * 0.93,25);
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!