通达信闪电主图指标公式

通达信支撑压力位主图指标公式

通达信闪电主图指标公式:

{红轨道}

红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;

轨道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;

SHENG:=IF(红轨道>=轨道,轨道,DRAWNULL);

升:SHENG,COLORFF00FF,LINETHICK2;

{箱体线}

N:=7;

T1:=CONst(LLVBARS(LOW,N));

T1HIGH:=CONST(REF(HIGH,T1));

CC:=CONST(CURRBARSCOUNT);

T2:=CONST(BArslAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));

T2HIGH:=CONST(REF(HIGH,T2));

T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));

T3HIGH:=CONST(REF(HIGH,T3));

突破杀入线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),DOTLINE,COLOR1188FF;

DRAWTEXT(ISLASTBAR, T3HIGH, '突破加仓!'),LINETHICK1,COLOR1188FF;

AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);

BA:=EMA(AB,5);

A1{高}:=REFDATE(REF(HHV(H,96),5),DATE);

B1{低}:=REFDATE(REF(LLV(L,96),5),DATE);

DY{中}:=((A1)+(B1))/2;

箱顶:IF(AB>0 AND AB-BA<=0,A1,A1),LINETHICK2,COLORGREEN;

箱腰:IF(AB>0 AND AB-BA<=0,DY,DY),DOTLINE,COLORYELLOW;

箱低:IF(AB>0 AND AB-BA<=0,B1,B1),LINETHICK2,COLORRED;

DRAWTEXT(ISLASTBAR,箱顶,'箱顶'),COLORYELLOW;

DRAWTEXT(ISLASTBAR,箱腰,'箱腰'),COLORYELLOW;

DRAWTEXT(ISLASTBAR,箱低,'箱低'),COLORYELLOW;

VARAA:=IF(CLOSE>150,91.3,0.913);

{突破:INTPART(CLOSE/VARAA )*VARAA,POINTDOT,LINETHICK4,COLORRED;

再突破:突破+VARAA,POINTDOT,LINETHICK4,COLOR00FF00 ;

回踩:(突破+再突破)/2,POINTDOT,COLORWHITE,LINETHICK4;}

STICKLINE(crOSS(zig(3,5),REF(ZIG(3,5),1)),箱低,箱腰,0.1,-1),COLORRED;

STICKLINE(CROSS(REF(ZIG(3,5),1),ZIG(3,5)),箱顶,箱腰,0.1,-1),COLORGREEN;

DRAWICON(CROSS(ZIG(3,5),REF(ZIG(3,5),1)),箱腰,1);

DRAWICON(CROSS(REF(ZIG(3,5),1),ZIG(3,5)),箱腰,2);

{画红色}

SZ:=C>REF(C,1);

STICKLINE(SZ,HIGH,LOW,0,0),COLORRED;

STICKLINE(SZ,OPEN,CLOSE,3.1, 0),COLOR000077;

STICKLINE(SZ,OPEN,CLOSE,2.5, 0),COLOR000088;

STICKLINE(SZ,OPEN,CLOSE,2.2, 0),COLOR000099;

STICKLINE(SZ,OPEN,CLOSE,1.9, 0),COLOR0000AA;

STICKLINE(SZ,OPEN,CLOSE,1.7, 0),COLOR0000BB;

STICKLINE(SZ,OPEN,CLOSE,1.3, 0),COLOR0000CC;

STICKLINE(SZ,OPEN,CLOSE,1.0, 0),COLOR0000DD;

STICKLINE(SZ,OPEN,CLOSE,0.7, 0),COLOR0000EE;

STICKLINE(SZ,OPEN,CLOSE,0.2, 0),COLOR0000FF;

{画蓝色}

XD:=C<REF(C,1);

STICKLINE(XD,O,L,0,0),COLOR888800;

STICKLINE(XD,O,L,0,0),COLORFFFF00;

STICKLINE(XD,C,O,3.1,0),COLOR888800;

STICKLINE(XD,C,O,3.0,0),COLOR999900;

STICKLINE(XD,C,O,2.4,0),COLORAAAA00;

STICKLINE(XD,C,O,2.0,0),COLORBBBB00;

STICKLINE(XD,C,O,1.6,0),COLORCCCC00;

STICKLINE(XD,C,O,1.2,0),COLORDDDD00;

STICKLINE(XD,C,O,0.6,0),COLOREEEE00;

STICKLINE(XD,C,O,0.1,0),COLORFFFF00;

{绝密买点}

A81:=EMA(C,3),COLORWHITE;

A82:=EMA(C,5),COLORYELLOW;

A83:=EMA(C,7),COLORMAGENTA;

A84:=EMA(C,12),COLORGREEN;

A85:=EMA(C,20),COLORRED;

A86:=EMA(C,50),COLORBLUE,LINETHICK2;

SS8:=CROSS(A81,A85) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 ;

SSS8:=CROSS(A81,A85) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018;

DRAWICON(SS8 ,L-0.15,5);

DRAWTEXT(SS8,L-0.15,'↖绝密买点'),COLORYELLOW;

ZYX1:="dmi.pdi"(12,6);

ZYX2:="DMI.mdi"(12,6);

ZYX3:=ZYX1>65 AND ZYX1>REF(ZYX1,1);

ZYX4:=LLV(ZYX1,0);

ZYX5:=BARSLAST(ZYX4=ZYX1);

ZYX6:=(0-REF(ZYX2,4))/(ZYX4-REF(ZYX2,ZYX5))>2;

ZYX7:=ZYX1>REF(ZYX1,1);

ZYX8:=vol>2*MA(VOL,30);

ZYX9:="DMI.ADX"(12,6);

ZYXA:="DMI.ADXR"(12,6);

ZYXB:=CLOSE>MA(CLOSE,30) AND CLOSE<MA(CLOSE,30)*1.04;

ZYXC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);

ZYXD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));

{ZYXE:=0-"macd.DIFF"(7,21,3);}

ZYXF:=TROUGHBARS(3,15,1)<4;

ZYX10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);

ZYX11:=IF(ZYXF=1,50,0);

ZYX12:=CROSS(ZYX2,ZYX1) AND CROSS(ZYXA,ZYX9);

ZYX13:=CROSS(ZYX2,ZYX1) AND CROSS(ZYX9,ZYXA);

ZYX14:=ZYXB AND ZYXC AND ZYXD AND ZYX10 AND ZYX6 AND ZYX7 AND ZYX8*50;

ZYX15:=BARSLAST(CROSS(ZYX2,ZYX1)=1);

ZYX16:=BARSLAST(CROSS(ZYX1,ZYX2)=1);

ZYX17:=HHV(ZYX1,ZYX16);

ZYX18:=BARSLAST(ZYX1=ZYX17);

{STICKLINE(FILTER(ZYXF=1,5),50,0,10,0),COLORRED;}

ZYX19:=ZYX3 OR ZYX12 OR ZYX13*100;

ZYX1A:=ZYX13*100;

DRAWICON(FILTER(ZYXF=1,3),MA(L,3),23);

DRAWTEXT(FILTER(ZYXF=1,3),箱低-0.1,'■■铁底■■'),COLORYELLOW;

LC:=REF((O+H+L+2*C)/5,1);

{突破盘整}

W1:=C=HHV(C,20);

W2:=BARSLAST(W1);

W3:=IF(W2>0,REF(C,W2),REF(C,W2));

W4:=CROSS(C,REF(W3,1));

突破盘整:=W4 AND COUNT(W4,5)=1;

{DRAWTEXT(突破盘整>0,MA(L,3),'↙突破盘整'),COLORRED;}

C6:=REF(C,1);

涨停:=IF((C-C6)*100/C6>=(10-0.01*100/C6),1,0);

STICKLINE(涨停,OPEN,CLOSE,1,0),COLORYELLOW;

STICKLINE(涨停,H,L,0,0),COLORYELLOW;

{DRAWTEXT(涨停,MA(H,3),'↙涨停'),COLORYELLOW;}

rsi1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(Abs(CLOSE-LC),3,1)*100;

SELL2:=(CROSS(88,RSI1));

DRAWTEXT(SELL2,MA(H,3),'↙出'),COLOR00FF00;

VB1:=C-REF(C,1);

VB2:=100*EMA(EMA(VB1,6),6)/EMA(EMA(ABS(VB1),6),6);

VB3:=IF(LLV(VB2,2)=LLV(VB2,7) AND COUNT(VB2<0,2) AND CROSS(VB2,MA(VB2,2)),1,0);

VB4:=FILTER(VB3=1,5);

DRAWTEXT(VB4,MA(L,3),'↖买'),COLOR00FFFF;

{N 1 100 20 M 1 100 32 P1 1 100 80 P2 1 100 100}

VARD1:=(C+H+O+L)/4;

卖出:=xma(VARD1,20)*(1+80/1000),COLORFFFFFF,LINETHICK3;

买入:=XMA(VARD1,32)*(1-100/1000),COLOR0000FF,LINETHICK3;

机会来临:=REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1),COLORF00FF0,LINETHICK2;

RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

K2:=REF(MA(RSV2,3),1)+(RSV2-REF(MA(RSV2,3),1))/3;

DD2:=REF(MA(K2,3),1)+(K2-REF(MA(K2,3),1))/3;

J2:=3*K2-2*DD2;

BB1:=EMA(J2,5);

BB2:=REF(BB1,1);

金叉:=CROSS(BB1,BB2);

{DRAWTEXT(CROSS(C,卖出),MA(H,3),'↙卖出'),COLOR00FFFF;}

{DRAWTEXT(CROSS(C,买入) AND BB1>BB2 AND C>REF(O,2),MA(L,3),'↖买入'),COLOR0000FF;}

DRAWICON(CROSS(C,买入) AND 金叉 AND 机会来临 ,MA(L,3),13);

DRAWTEXT(CROSS(C,买入) AND 金叉 AND 机会来临,MA(L,3),'↖【绝杀点】'),COLORYELLOW;

通达信跟庄黄金金叉主图指标公式