MID11:=EMA(CLOSE,299),COLORBLUE;
TMP22:=STD(CLOSE,299);
TOP11:MID11+2*TMP22,COLORGRAY,DOT;
BOTTOM11:MID11-2*TMP22,COLORGRAY,DOT;
X11:=BARSLAST(H TOP11);
X22:=BARSLAST(L BOTTOM11);
IF(TOP11 REF(TOP11,1) X11 X22,TOP11,NULL),RGB(255,0,255),LINETHICK2;
IF(TOP11 REF(TOP11,1) X11 X22,TOP11,NULL),COLORYELLOW,LINETHICK2;
IF(BOTTOM11 REF(BOTTOM11,1) X11 X22,BOTTOM11,NULL),COLORGREEN,LINETHICK2;
IF(BOTTOM11 REF(BOTTOM11,1) X11 X22,BOTTOM11,NULL),COLORYELLOW,LINETHICK2;