在线检测未来函数

通达信均线扭曲主图指标公式

来源:Internet,编辑:股旁网,2013-08-01

均价:=(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,'一阳三线');

通达信均线扭曲主图指标公式

 

相关文章