以下是通达信均线扭曲主图指源码

均价:=(C+(H+L)/2*0.382+(C+O)/2*0.618)/2;
 X1:=EMA((均价+H)/2,5),COLORWHITE;
 X2:=EMA(X1,8),COLORWHITE,LINETHICK2;
 X3:=EMA(X2,13),COLORFFF000;
 X4:=EMA(X3,21),COLORFFF000,LINETHICK2;
 X5:=EMA(X4,34),COLORYELLOW;
 X6:=EMA(X5,55),COLORYELLOW,LINETHICK2;
 X7:=EMA(X6,89),COLOR7F00FF,LINETHICK2;
多空线:(X3+X4)/2,COLORMAGENTA;
反多空线:=EMA(多空线-(EMA(均价,2)-多空线),2),COLORGRAY,LINETHICK1;
 {FILLRGN(反多空线>多空线,多空线,反多空线),COLORBLUE;
 FILLRGN(反多空线<=多空线,多空线,反多空线),COLOR7F00FF,COLORBROWN;}
 DRAWBAND(多空线,RGB(100,15,55),反多空线,RGB(0,100,150));
操盘线:X1,COLORWHITE;
盈亏线:X2,COLORLIGREEN,LINETHICK2;
启动线:X3,COLORLIRED;

生命线:X4,COLORFFF000,LINETHICK2;
行情线:X6,COLORYELLOW,LINETHICK2;
牛熊线:X7,COLOR7F00FF,LINETHICK2;
乾坤线:=EMA(X6-(EMA((均价+C)/2,2)-X6),2);
 IF(乾坤线>X6,X6,DRAWNULL),COLOR00AA99,LINETHICK2;
 STICKLINE(OPEN>=CLOSE,HIGH,LOW,0,0),COLORFFCC00;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF9F68;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.8,0),COLORFF9900;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.6,0),COLORFFAA11;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.5,0),COLORFFBB11;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.4,0),COLORFFCC22;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.3,0),COLORFFDD22;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2,0),COLORFFEE33;
 STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1,0),COLORFFFF33;
 STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),COLORFFFFFF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLORCCFFFF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.7,0),COLOR3300CC;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.6,0),COLOR33CCFF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0),COLOR6633CC;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR3333FF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.3,0),COLOR6633FF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR3366FF;
 STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0),COLOR6666FF;
 {K线卖提示}
QC0:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
 STICKLINE(QC0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,OPEN,CLOSE,3,0),COLOR3366FF;
 STICKLINE(QC0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,H,L,0,0),COLOR3366FF;
 {VAR11:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);{ZIG 有未来
VAR123:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);}
 KSD:=IF(O>C,O,C);
 VAR12:=IF(TROUGHBARS(KSD,10,1)=1,1,0);
 VAR1:=IF(PEAKBARS(KSD,10,1)=1,1,0);
 STICKLINE(VAR1,C,O,3,0),COLORYELLOW,LINETHICK2;{高位黄色}
STICKLINE(VAR1,C,O,2,0),COLORGRAY,LINETHICK2;{高位黄色}
STICKLINE(VAR1,H,L,0.5,0),COLORYELLOW,LINETHICK2;{高位黄色}
STICKLINE(VAR12,C,O,3,0),COLOR9900FF,LINETHICK2;{底位红色}
STICKLINE(VAR12,C,O,2,0),COLORWHITE,LINETHICK2;{底位红色}
STICKLINE(VAR12,H,L,0.5,0),COLORMAGENTA,LINETHICK2;{底位红色}
缺口:=(L>REF(H,1));
不破:=(EVERY(L>REF(H,BARSLAST(缺口)+1),BARSLAST(缺口)+1));
 STICKLINE(不破,REF(H,BARSLAST(缺口)+1),REF(L,BARSLAST(缺口)),1,0),COLORYELLOW;
下缺口:=(H<REF(L,1));
不补:=(EVERY(H<REF(L,BARSLAST(下缺口)+1),BARSLAST(下缺口)+1));
 STICKLINE(不补,REF(L,BARSLAST(下缺口)+1),REF(H,BARSLAST(下缺口)),1,0),COLORGREEN;
 M1:=MA(C,5);
 M2:=MA(C,18);
 M3:=MA(C,34);
一阳1:=O<M1 AND C>M1;
一阳2:=O<M2 AND C>M2;
一阳3:=O<M3 AND C>M3;
一阳穿三线:=一阳1+一阳2+一阳3>2;
 DRAWTEXT(一阳穿三线,L,’一阳三线’);

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