以下是通达信卖出预警2源码公式

N:=15;
生命线:=98,LINETHICK1,COLORYELLOW;
生命禁区:=95,LINETHICK1,COLORRED;
股价泥潭:=20,LINETHICK1,COLORBLUE;
生死线:=50,LINETHICK2,COLORWHITE;
 C0:=(H+L+C)/3;
 A1:=HHV(C0,N);
 A2:=LLV(C0,N);
 A3:=A1-A2;
 A4:=EMA((C0-A2)/A3,2)*100;
 B1:=HHV(C0,4*N);
 B2:=LLV(C0,4*N);
 B3:=B1-B2;
 B4:=EMA((C0-B2)/B3,2)*100;
 C1:=HHV(C0,16*N);C2:=LLV(C0,16*N);C3:=C1-C2;
 C4:=EMA((C0-C2)/C3,2)*100;
短期:A4,COLORGREEN,LINETHICK1;
中期:B4,COLORYELLOW,LINETHICK2;
长期:C4,COLORRED,LINETHICK3;
 IF(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*1.1,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORGREEN;
 DRAWTEXT(CROSS(生命禁区,短期) AND REF(短期,1)>短期,短期*1.08,’←卖’), COLORCYAN;
 IF(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*1.1,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORYELLOW;
 DRAWTEXT(CROSS(生命线,短期) AND REF(短期,1)>短期,短期*1.08,’←卖’), COLORCYAN;
 DRAWTEXT(CROSS(短期,生命禁区),85,’警惕!! ‘),COLORWHITE;
 DRAWTEXT(CROSS(中期,生命禁区),95,’减磅’),COLORFF6800;
 DRAWTEXT(CROSS(长期,生命禁区),100,’出局’),COLORMAGENTA;
 DRAWICON(CROSS(短期,生命禁区),85,1);
 DRAWTEXT(CROSS(中期,生命禁区),95,’▲’),COLORRED;
 DRAWICON(CROSS(长期,生命禁区),100,3);

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