通达信大小通道主图指标公式

通达信楚汉相争主图指标公式

N:=5;

V1:=(MA(HIGH,30))*(1.149999976158);

V2:=(MA(HIGH,3))*(1.02999997139);

V3:=(MA(LOW,3))*(0.9700000286102);

V4:=(MA(LOW,30))*(0.8500000238419);

大通道上:MA(V1,30),COLORYELLOW;

大通道下:MA(V4,30),COLORYELLOW;

小通道上:MA(V2,30),COLORFF00FF;

小通道下:MA(V3,30),COLOR00FF00;

A1:=大通道上 - REF(大通道上,1);

A2:=小通道上 - REF(小通道上,1);

A3:=小通道下 - REF(小通道下,1);

A4:=大通道下 - REF(大通道下,1);

IF((A1 > 0),大通道上,DRAWNULL),LINETHICK2,COLORRED;

IF((A1 = 0),大通道上,DRAWNULL),LINETHICK2,COLORFFFFFF;

IF((A1 < 0),大通道上,DRAWNULL),LINETHICK2,COLOR008000;

IF((A2 > 0),小通道上,DRAWNULL),LINETHICK2,COLORMAGENTA;

IF((A2 = 0),小通道上,DRAWNULL),LINETHICK2,COLORFFFFFF;

IF((A2 < 0),小通道上,DRAWNULL),LINETHICK2,COLORGREEN;

IF((A3 > 0),小通道下,DRAWNULL),LINETHICK2,COLORCYAN;

IF((A3 = 0),小通道下,DRAWNULL),LINETHICK2,COLORFFFFFF;

IF((A3 < 0),小通道下,DRAWNULL),LINETHICK2,COLORGREEN;

IF((A4 > 0),大通道下,DRAWNULL),LINETHICK2,COLORRED;

IF((A4 = 0),大通道下,DRAWNULL),LINETHICK2,COLORFFFFFF;

IF((A4 < 0),大通道下,DRAWNULL),LINETHICK2,COLOR008000;

KXS:=2;

DSJ:=1;

GET:zig(3,N),COLORYELLOW;

PL5:=(ZIG(3,5))*(DSJ);

EN1:=(ZIG(3,5) > REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) <= REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2) <= (REF(ZIG(3,5),3))*(DSJ));

EX1:=(ZIG(3,5) < REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) >= REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2) >= (REF(ZIG(3,5),3))*(DSJ));

PL10:=(ZIG(3,10))*(DSJ);

EN2:=(ZIG(3,10) > REF(ZIG(3,10),1)) AND (REF(ZIG(3,10),1) <= REF(ZIG(3,10),2)) AND (REF(ZIG(3,10),2) <= (REF(ZIG(3,10),3))*(DSJ));

EX2:=(ZIG(3,10) < REF(ZIG(3,10),1)) AND (REF(ZIG(3,10),1) >= REF(ZIG(3,10),2)) AND (REF(ZIG(3,10),2) >= (REF(ZIG(3,10),3))*(DSJ));

PL20:=(ZIG(3,20))*(DSJ);

EN3:=(ZIG(3,20) > REF(ZIG(3,20),1)) AND (REF(ZIG(3,20),1) <= REF(ZIG(3,20),2)) AND (REF(ZIG(3,20),2) <= (REF(ZIG(3,20),3))*(DSJ));

EX3:=(ZIG(3,20) < REF(ZIG(3,20),1)) AND (REF(ZIG(3,20),1) >= REF(ZIG(3,20),2)) AND (REF(ZIG(3,20),2) >= (REF(ZIG(3,20),3))*(DSJ));

PL40:=(ZIG(3,40))*(DSJ);

走强1:=BArslAst((PL5 < REF(PL5,1)));

走弱1:=BARSLAST((PL5 > REF(PL5,1)));

走强2:=BARSLAST((PL10 < REF(PL10,1)));

走弱2:=BARSLAST((PL10 > REF(PL10,1)));

走强3:=BARSLAST((PL20 < REF(PL20,1)));

走弱3:=BARSLAST((PL20 > REF(PL20,1)));

ZTJZ5:=IF((PL10 > REF(PL10,1)),COUNT(EN1,走强2),0);

ZTJD5:=IF((PL10 > REF(PL10,1)),COUNT(EX1,走强2),0);

DTJZ5:=IF((PL10 < REF(PL10,1)),COUNT(EN1,走弱2),0);

DTJD5:=IF((PL10 < REF(PL10,1)),COUNT(EX1,走弱2),0);

ZTJZ10:=IF((PL20 > REF(PL20,1)),COUNT(EN2,走强3),0);

ZTJD10:=IF((PL20 > REF(PL20,1)),COUNT(EX2,走强3),0);

DTJZ10:=IF((PL20 < REF(PL20,1)),COUNT(EN2,走弱3),0);

DTJD10:=IF((PL20 < REF(PL20,1)),COUNT(EX2,走弱3),0);

DRAWTEXT(EN1 AND (DTJZ5 = 1),(LOW)*(0.9800000190735),'㈠'),COLORFFFF00;

DRAWTEXT(EX1 AND (DTJD5 = 2),(HIGH)*(1.019999980927),'㈡'),COLORFFFF00;

DRAWTEXT(EN2 AND (ZTJZ5 = 1),(LOW)*(0.9800000190735),'㈢'),COLORFFFF00;

DRAWTEXT(EX1 AND (PL10 > REF(PL10,1)) AND (ZTJD5 = 1),(HIGH)*(1.019999980927),'⑴'),COLOR00FF00;

DRAWTEXT(EN1 AND (PL10 > REF(PL10,1)) AND (ZTJZ5 = 2),(LOW)*(0.9800000190735),'⑵'),COLOR00FF00;

DRAWTEXT(EX1 AND (PL10 > REF(PL10,1)) AND (ZTJZ5 = 2),(HIGH)*(1.019999980927),'⑶'),COLOR00FF00;

DRAWTEXT(EN1 AND (PL10 > REF(PL10,1)) AND (ZTJZ5 = 3),(LOW)*(0.9800000190735),'⑷'),COLOR00FF00;

DRAWTEXT(EX2 AND (PL20 > REF(PL20,1)) AND (ZTJD10 = 1),(HIGH)*(1.019999980927),'⑸'),COLOR00FF00;

DRAWTEXT(EN2 AND (DTJZ10 = 1),(LOW)*(0.9399999976158),'Ⅰ'),COLORFF0000;

DRAWTEXT(EX2 AND (DTJD10 = 2),(HIGH)*(1.05999994278),'Ⅱ'),COLORFF0000;

DRAWTEXT(EN3 AND (ZTJZ10 = 1),(LOW)*(0.9399999976158),'Ⅲ'),COLORFF0000;

DRAWTEXT(EX2 AND (PL20 > REF(PL20,1)) AND (ZTJD10 = 1),(HIGH)*(1.05999994278),'①'),LINETHICK3,COLOR008000;

DRAWTEXT(EN2 AND (PL20 > REF(PL20,1)) AND (ZTJZ10 = 2),(LOW)*(0.9399999976158),'②'),LINETHICK3,COLOR008000;

DRAWTEXT(EX2 AND (PL20 > REF(PL20,1)) AND (ZTJD10 = 2) OR (ZTJD10 = 0) OR (ZTJD10 = 2) AND EX2,((HIGH)*(1.05999994278))*(DSJ),'③'),LINETHICK3,COLOR008000;

DRAWTEXT(EN2 AND (PL20 > REF(PL20,1)) AND (ZTJZ10 = 3),(LOW)*(0.9399999976158),'④'),LINETHICK3,COLOR008000;

通达信短线交易系统指标公式