以下是通达信【分时主图】在分时图上用颜色标识当前价和5日10日均线的关系
{分时主图}
{橙色线表示分时股价在5天均线下方}
{紫色线表示分时股价在10天均线下方}
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;