对附件里的公式,做了少少修改,源码如下:
MA20:=MA(CLOSE,20);
中线:=EMA(CLOSE,10);
升线:=STD(中线,7);
降线:=-STD(中线,7);
持股:=IF(升线>REF(升线,1) AND NOT(CLOSE<中线),升线,DRAWNULL);
消失跟进:=IF(降线>REF(降线,1) AND NOT(CLOSE>中线),降线,DRAWNULL);
DRAWTEXT(FILTER(持股>0,20),MA20-1.01,70),COLOR0055FF;
STICKLINE(消失跟进,LOW*0.96,LOW*0.94,1,0),COLORWHITE;
A0:=(LOW+HIGH+CLOSE*2)/4;
A1:=EMA(A0,14);{WWW.70822.com}
A1X:=(A1-REF(A1,1))/REF(A1,1)*100;
G1:=BARSLAST(CROSS(A1X,0));
西电:=REF(A0,G1);{WWW.70822.com}
西点起步:IF(A1X>=0,西电,DRAWNULL),COLORRED,LINETHICK2;
DRAWTEXT(ISLASTBAR,西点起步,66),COLORRED;
西点1:=REF(A0,G1)*1.1;
西点2:=REF(A0,G1)*1.2;
西点3:=REF(A0,G1)*1.3;
一级:IF(HIGH>=西点1,西点1,DRAWNULL),COLORYELLOW,LINETHICK2;
二级:IF(HIGH>=西点2,西点2,DRAWNULL),COLORGREEN,LINETHICK2;
三级:IF(HIGH>=西点3,西点3,DRAWNULL),CIRCLEDOT,COLORWHITE;
DRAWTEXT(ISLASTBAR,一级,67),COLORYELLOW;
DRAWTEXT(ISLASTBAR,二级,68),COLORGREEN;
DRAWTEXT(ISLASTBAR,三级,69),COLORWHITE;
p20184818251361125.jpg
|