FS:=PERIOD = 0;
DAYMA1:=MA.MA1#DAY;
DAYMA2:=MA.MA2#DAY;
T1:=MAX(DAYMA1,DAYMA2);
T2:=MIN(DAYMA1,DAYMA2);
IF(FS AND CLOSE<T1 AND DAYMA1=T1,CLOSE,DRAWNULL),LINETHICK2,COLOR4080FF;
IF(FS AND CLOSE<T2 AND DAYMA1=T1,CLOSE,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(FS AND CLOSE<T1 AND DAYMA1=T2,CLOSE,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(FS AND CLOSE<T2 AND DAYMA1=T2,CLOSE,DRAWNULL),LINETHICK2,COLOR4080FF;