DIFF := EMA(CLOSE,12) – EMA(CLOSE,26); DEA := EMA(DIFF,9); MACD:=2*(DIFF-DEA),COLORSTICK; DRAWCOLORKLINE(DIFF>DEA&&C>=O,COLORRED,1); DRAWCOLORKLINE(DIFF>DEA&&C<O,COLORRED,0); DRAWCOLORKLINE(DIFF<DEA&&C>=O,COLORGREEN,1); DRAWCOLORKLINE(DIFF<DEA&&C<O,COLORGREEN,0); 将红色区间的最高点与绿色区间的最低点循环连接 (来源:文华财经)