程序化指标MACD能量指标公式
发布日期: 2025-08-26 | 阅读量:27
DIFF := EMA(C,12) - EMA(C,24);
DEA := EMA(DIFF, 6);
多头能量: (DEA >= 0) * DEA, COLORWHITE, LINETHICK0;
空头能量: (DEA < 0) * DEA, COLORD4FF7F, LINETHICK0;
下跌趋势: (DIFF < 0) * DIFF, COLORB00058, LINETHICK0;
上涨趋势: (DIFF >= 0) * DIFF, COLORRED, LINETHICK0;
STICKLINE(DEA >= 0, DEA, 0, 3, 0), COLOR00FF00; { DEA 多头柱,绿色 }
STICKLINE(DEA < 0, DEA, 0, 3, 0), COLORD4FF7F; { DEA 空头柱,浅紫 }
STICKLINE(DIFF < 0, DIFF, 0, 3, 0), COLORB00058; { DIFF 下跌柱,深紫 }
STICKLINE(DIFF >= 0, DIFF, 0, 3, 0), COLORRED; { DIFF 上涨柱,红色 };