N:=6;
XB1:=TROUGH(2,N,1),COLORGRAY;
CB1:=CONST(TROUGHBARS(2,N,1));
B1:IF(CURRBARSCOUNT<CB1+3,CONST(XB1),DRAWNULL),COLORGRAY;
XB2:=TROUGH(2,N,2),COLORGRAY;
CB2:=CONST(TROUGHBARS(2,N,2));
B2:IF(CURRBARSCOUNT<CB2+3 AND CURRBARSCOUNT>CB1-1,CONST(XB2),DRAWNULL),COLORGRAY;
XB3:=TROUGH(2,N,3),COLORGRAY;
CB3:=CONST(TROUGHBARS(2,N,3));
B3:IF(CURRBARSCOUNT<CB3+3 AND CURRBARSCOUNT>CB2-1,CONST(XB3),DRAWNULL),COLORGRAY;
XB4:=TROUGH(2,N,4),COLORGRAY;
CB4:=1+CONST(TROUGHBARS(2,N,4));
B4:IF(CURRBARSCOUNT<CB4+3 AND CURRBARSCOUNT>CB3-1,CONST(XB4),DRAWNULL),COLORGRAY;
XT1:=PEAK(1,N,1),COLORGRAY;
CT1:=CONST(PEAKBARS(1,N,1));
T1:IF(CURRBARSCOUNT<CT1+3,CONST(XT1),DRAWNULL),COLORLIRED;
XT2:=PEAK(1,N,2),COLORGRAY;
CT2:=CONST(PEAKBARS(1,N,2));
T2:IF(CURRBARSCOUNT<CT2+3 AND CURRBARSCOUNT>CT1-1,CONST(XT2),DRAWNULL),COLORLIRED;
XT3:=PEAK(1,N,3),COLORGRAY;
|