指标有清晰的提示,低位出现红线买入。高位出现绿线卖出。使用的时候要灵活点。

源码

VAR1:=LLV(LOW,10);
VAR2:=HHV(HIGH,15);
动力线:= EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,4);
趋势:MA(动力线,2);
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),3.5,0),COLOR000033;  
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),2.8,0),COLOR000055;  
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),2.0,0),COLOR000077;  
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),1.2,0),COLOR000099;  
STICKLINE(REF(趋势,1)< 趋势, 趋势,REF(趋势,1),0.4,0),COLOR0000DD;  
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),3.5,0),COLOR003300;  
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),2.8,0),COLOR005500;  
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),2.0,0),COLOR007700;  
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),1.2,0),COLOR009900;  
STICKLINE(REF(趋势,1)> 趋势, 趋势,REF(趋势,1),0.4,0),COLOR00DD00; 
下跌趋势:IF(趋势<REF(趋势,1),趋势,DRAWNULL),colorgreen,LINETHICK4;
上涨趋势:IF(趋势>REF(趋势,1),趋势,DRAWNULL),colorred,LINETHICK4;
B:=趋势,colorwhite;
G:MA(B,2),coloryellow,POINTDOT;
D:=CROSS(B,G)*1000,colorred;
W:=CROSS(G,B)*1000,POINTDOT,colorblue;
DRAWTEXT(W=1000,B*1.05,’高卖’ ),COLORFFFF00;
DRAWTEXT(D=1000,B*1.05,’  低买’),COLORFFFFFF;
低买:D,NODRAW,COLORFFFFFF;
高卖:W,NODRAW,COLOR00FF00;
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);
短牛买:BT,NODRAW,COLOR0000FF;
STICKLINE(UP,0,0.2,3,0),COLOR0000FF;
STICKLINE(DOWN,0,0.2,3,0),COLOR00FF00;
STICKLINE(BT,0,3,2,0),COLOR000088;
STICKLINE(BT,0,3,1,0),COLOR0000CC;
STICKLINE(BT,0,3,0.22,0),COLOR0000FF;
DRAWTEXT(BT,3,’  短牛买’),COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
中牛买:TJ1,NODRAW,COLORFF00FF;
STICKLINE(TJ1,0,2,3,0),COLOR880088;
STICKLINE(TJ1,0,2,1.5,0),COLORAA00AA;
STICKLINE(TJ1,0,2,0.8,0),COLORCC00CC;
STICKLINE(TJ1,0,2,0.2,0),COLORFF00FF;
DRAWTEXT(TJ1,2,’  中牛买’),COLORFF00FF;
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;
大牛买:TJ2,NODRAW,COLOR00FFFF;
STICKLINE(TJ2,0,1,3,0),COLOR008888;
STICKLINE(TJ2,0,1,2,0),COLOR00AAAA;
STICKLINE(TJ2,0,1,1,0),COLOR00CCCC;
STICKLINE(TJ2,0,1,0.2,0),COLOR00FFFF;
DRAWTEXT(TJ2,1,’  大牛买’),COLOR00FFFF;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。