把(背离王)和(趋势王)同时变红做个选股和预警
2020/1/22 18:24:54
公式编写说明:
(趋势王)码源A1:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,3)+EMA((OPEN+HIGH+LOW+CLOSE)/4,6)+EMA((OPEN+HIGH+LOW+CLOSE)/4,9))/3;A2:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,5)+EMA((OPEN+HIGH+LOW+CLOSE)/4,10)+EMA((OPEN+HIGH+LOW+CLOSE)/4,20))/3;A3:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,7)+EMA((OPEN+HIGH+LOW+CLOSE)/4,14)+EMA((OPEN+HIGH+LOW+CLOSE)/4,28))/3;A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,36))/3;A5:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22)+EMA((OPEN+HIGH+LOW+CLOSE)/4,44))/3;A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,52))/3;ma1:=FORCAST(A1,6);ma2:=FORCAST(A2,6);ma3:=FORCAST(A3,6);ma4:=FORCAST(A4,6);ma5:=FORCAST(A5,6);ma6:=FORCAST(A6,6);partline(ma2,ma2ref(ma2,1),rgb(255,0,255)),dotline;partline(ma3,ma3ref(ma3,1),rgb(255,0,255)),dotline;partline(ma4,ma4ref(ma4,1),rgb(255,0,255)),dotline;partline(ma5,ma5ref(ma5,1),rgb(255,0,255)),dotline;partline(ma6,ma6ref(ma6,1),rgb(255,0,255)),dotline;partline(ma1,ma1ref(ma1,1),rgb(255,0,255)),dotline;TOWERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));DIRECTIONMIN:=MIN(REF(TOWERC,1),REF(TOWERC,1));STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,DIRECTIONMAX,8,0),color0000FF;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,DIRECTIONMIN,8,0),color00FF00;{背离王公式码源}A1:=FORCAST(EMA(CLOSE,5),6);A2:=FORCAST(EMA(CLOSE,8),6);A3:=FORCAST(EMA(CLOSE,11),6);A4:=FORCAST(EMA(CLOSE,14),6);A5:=FORCAST(EMA(CLOSE,17),6);FORCAST(EMA(B,3),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,4),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,5),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,6),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,7),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,8),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,9),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,10),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,11),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,12),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,13),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,14),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,15),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,16),6),POINTDOT,COLORGREEN;FORCAST(EMA(B,17),6),POINTDOT,COLORGREEN;STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,REF(TOWERC,1),8,0),COLORRED;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,REF(TOWERC,1),8,0),COLORGREEN;STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,REF(TOWERC,1),5,0),COLORRED;STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,REF(TOWERC,1),3,0),COLORRED;STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,REF(TOWERC,1),0,0),COLORRED;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,REF(TOWERC,1),8,0),COLORGREEN;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,REF(TOWERC,1),5,0),COLORGREEN;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,REF(TOWERC,1),2,0),COLORGREEN;STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,REF(TOWERC,1),0,0),COLORGREEN;请老师帮忙把这两个公式同时出红做个选股和预警指标,大智慧用,谢谢。
公式源码回答:
TOWERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);
A1:=FORCAST(EMA(CLOSE,5),6);
A2:=FORCAST(EMA(CLOSE,8),6);
A3:=FORCAST(EMA(CLOSE,11),6);
A4:=FORCAST(EMA(CLOSE,14),6);
A5:=FORCAST(EMA(CLOSE,17),6);
B:=A1+A2+A3+A4-4*A5;
TOWERC1:=EMA(B,2);
CROSS(TOWERC>=REF(TOWERC,1),0.5) AND CROSS(TOWERC1>=REF(TOWERC1,1),0.5);
投 股票网 www. tou18.cn
股市公式下载推荐