VARIABLE: DS:=0,KS:=0;
IF BARSSP = 1 && LASTOFFSETPROFIT < 0 THEN BEGIN
DS:=DS + 1;
END
IF BARSSP = 1 && LASTOFFSETPROFIT > 0 THEN BEGIN
DS:=0;
END
IF BARSBP = 1 && LASTOFFSETPROFIT < 0 THEN BEGIN
KS:=KS + 1;
END
IF BARSBP = 1 && LASTOFFSETPROFIT > 0 THEN BEGIN
KS:=0;
END
MA1:=MA(C,03);
MA2:=MA(C,10);
MA3:=MA(C,30);
MA4:=MA(C,60);
MA5:=MA(C,150);
MA6:=MA(C,300);
A1:=MA(C,05);
A2:=MA(C,10);
A3:=MA(C,30);
A4:=MA(C,60);
A5:=MA(C,150);
A6:=MA(C,200);
DRAWCOLORKLINE(C >= MA2 && ISDOWN = 0,COLORRED,1);
DRAWCOLORKLINE(C >= MA2 && ISDOWN = 1,COLORRED,0);
DRAWCOLORKLINE(C < MA2 && ISDOWN = 0,COLORBLACK,1);
DRAWCOLORKLINE(C < MA2 && ISDOWN = 1,COLORBLACK,0);
CROSS(MA1,MA2);
DRAWLINE1(CROSS(MA1,MA2),MA1,CROSS(MA2,MA1),MA1,0), DASH , COLORBLUE;
DRAWLINE1(CROSS(MA2,MA1),MA1,CROSS(MA1,MA2),MA1,0), DASH , COLORBLUE;
CROSS(MA1,MA3);
DRAWLINE1(CROSS(MA1,MA3),MA1,CROSS(MA3,MA1),MA1,0), DASHDOT , COLORBLUE;
DRAWLINE1(CROSS(MA3,MA1),MA1,CROSS(MA1,MA3),MA1,0), DASHDOT , COLORBLUE;
CROSS(MA1,MA4);
DRAWLINE1(CROSS(MA1,MA4),MA1,CROSS(MA4,MA1),MA1,0), LINETHICK1 , COLORBLUE;
DRAWLINE1(CROSS(MA4,MA1),MA1,CROSS(MA1,MA4),MA1,0), LINETHICK1 , COLORBLUE;
CROSS(MA1,MA5);
DRAWLINE1(CROSS(MA1,MA5),MA1,CROSS(MA5,MA1),MA1,0), DASH , COLORBLUE;
DRAWLINE1(CROSS(MA5,MA1),MA1,CROSS(MA1,MA5),MA1,0), DASH , COLORBLUE;
CROSS(MA1,MA6);
DRAWLINE1(CROSS(MA1,MA6),MA1,CROSS(MA6,MA1),MA1,0), DASHDOTDOT , COLORBLUE;
DRAWLINE1(CROSS(MA6,MA1),MA1,CROSS(MA1,MA6),MA1,0), DASHDOTDOT , COLORBLUE;
AAA:=VALUEWHEN(CROSS(MA1,MA2)|| CROSS(MA2,MA1),C);
AAA1:=VALUEWHEN(CROSS(MA1,MA2)|| CROSS(MA2,MA1),REF(AAA,1));
AAA2:=VALUEWHEN(CROSS(MA1,MA2)|| CROSS(MA2,MA1),REF(AAA1,2));
N : BARSLAST(CROSS(MA1,MA2)|| CROSS(MA2,MA1))+ 1;
DRAWSL(CROSS(MA1,MA2),REF(AAA,1),0,-1 * REF(N,1),0,RGB(255,128,0));
DRAWSL(CROSS(MA2,MA1),REF(AAA,1),0,-1 * REF(N,1),0,RGB(255,128,0));
DRAWNUMBER(CROSS(MA1,MA2),AAA1,AAA1 – AAA2,2,RGB(255,128,0));
DRAWNUMBER(CROSS(MA2,MA1),AAA1,AAA2 – AAA1,2,RGB(255,128,0));
DRAWSHIFTNUMBER(COUNTSIG(BK,1)= 1 || COUNTSIG(SP,1)= 1,REF(L,0),DS,0,COLORRED,0,0), FONTSIZE25 , VALIGN1;
DRAWSHIFTNUMBER(COUNTSIG(SK,1)= 1 || COUNTSIG(BP,1)= 1,REF(H,0),KS,0,RGB(128,0,255),0,0), FONTSIZE25 , VALIGN2;
DRAWNUMBER(COUNTSIG(BK,1)= 1,L – 20 * MINPRICE,BKVOL,0,RGB(64,128,128)), FONTSIZE35 , VALIGN0;
DRAWNUMBER(COUNTSIG(SK,1)= 1,H + 20 * MINPRICE,SKVOL,0,COLORCYAN), FONTSIZE35 , VALIGN2;
DRAWGBK1(MA1 >= MA6,COLORWHITE);
DRAWGBK1(MA1 < MA6,COLORLIGHTGREY);
JC : A1 > A2;
SC : A1 < A2;
JCA : CROSS(MA1,MA2);
SCA : CROSS(MA2,MA1);
JCB : CROSS(MA1,MA3);
SCB : CROSS(MA3,MA1);
JCC : CROSS(MA1,MA4);
SCC : CROSS(MA4,MA1);
JCD : CROSS(MA1,MA5);
SCD : CROSS(MA5,MA1);
JCE : CROSS(MA1,MA6);
SCE : CROSS(MA6,MA1);
WZD1:=C > MA6 && C < MA5;
WZK1:=C < MA6 && C > MA5;
WZD2:=C > MA5 && C < MA4;
WZK2:=C < MA5 && C > MA4;
WZD3:=C > MA4 && C < MA3;
WZK3:=C < MA4 && C > MA3;
WZD4:=C > MA3 && C < MA2;
WZK4:=C < MA3 && C > MA2;
WZD1 && JCA , SK(‘A’);
SCA , BP(‘A’);
C < BKPRICE – VOLMARGIN * 0.06 , SP(‘A’);
WZK1 && SCA , BK(‘A’);
JCA , SP(‘A’);
C > SKPRICE + VOLMARGIN * 0.06 , BP(‘A’);
WZD2 && JCA , SK(‘C’);
SCA , BP(‘C’);
WZK2 && SCA , BK(‘C’);
JCA , SP(‘C’);
C < BKPRICE – VOLMARGIN * 0.06 , SP(‘C’);
C > SKPRICE + VOLMARGIN * 0.06 , BP(‘C’);
WZD3 && JCA , SK(‘E’);
SCA , BP(‘E’);
WZK3 && SCA , BK(‘E’);
JCA , SP(‘E’);
C < BKPRICE – VOLMARGIN * 0.06 , SP(‘E’);
C > SKPRICE + VOLMARGIN * 0.06 , BP(‘E’);
WZD4 && JCA , SK(‘G’);
SCA , BP(‘G’);
WZK4 && SCA , BK(‘H’);
JCA , SP(‘H’);
C < BKPRICE – VOLMARGIN * 0.06 , SP(‘H’);
C > SKPRICE + VOLMARGIN * 0.06 , BP(‘G’);
TMP1:=C < BKPRICE – 30 * MINPRICE;
TMP2:=C > SKPRICE + 30 * MINPRICE;
TMP1 , BP(‘A’);
TMP1 , BP(‘C’);
TMP1 , BP(‘E’);
TMP1 , BP(‘G’);
TMP1 , BP(‘H’);
TMP2 , SP(‘A’);
TMP2 , SP(‘C’);
TMP2 , SP(‘E’);
TMP2 , SP(‘G’);
TMP2 , SP(‘H’);
SIGCHECK(‘A’,5);
AUTOFILTER;