量化MACD副图指标公式
发布日期: 2025-08-23 | 阅读量:34
DIFF := EMA(C,12) - EMA(C,25), NODRAW;
DEA := EMA(DIFF,6), NODRAW;
获利回吐: (DEA >= 0) * DEA, COLORLIBLUE, LINETHICK1;
空头回补: (DEA < 0) * DEA, COLORMAGENTA, LINETHICK1;
坚决做空: (DIFF < 0) * DIFF, COLORGREEN, LINETHICK1;
买入持股: (DIFF >= 0) * DIFF, COLORRED, LINETHICK1;
STICKLINE(DEA >= 0, DEA, 0, 3.2, 0), COLORAAAAAA;
STICKLINE(DEA >= 0, DEA, 0, 2.9, 0), COLOR777777;
STICKLINE(DEA >= 0, DEA, 0, 2.4, 0), COLOR999999;
STICKLINE(DEA >= 0, DEA, 0, 1.8, 0), COLORBBBBBB;
STICKLINE(DEA >= 0, DEA, 0, 1.1, 0), COLORDDDDDD;
STICKLINE(DEA >= 0, DEA, 0, 0.3, 0), COLORFFFFFF;
STICKLINE(DEA < 0, DEA, 0, 3.2, 0), COLORFF5500;
STICKLINE(DEA < 0, DEA, 0, 2.9, 0), COLORYELLOW;
STICKLINE(DEA < 0, DEA, 0, 2.4, 0), COLORYELLOW;
STICKLINE(DEA < 0, DEA, 0, 1.8, 0), COLORYELLOW;
STICKLINE(DEA < 0, DEA, 0, 1.1, 0), COLORYELLOW;
STICKLINE(DEA < 0, DEA, 0, 0.3, 0), COLORYELLOW;
STICKLINE(DIFF < 0, DIFF, 0, 3.2, 0), COLORCC0066;
STICKLINE(DIFF < 0, DIFF, 0, 2.9, 0), COLOREE0066;
STICKLINE(DIFF < 0, DIFF, 0, 1.8, 0), COLORFF2266;
STICKLINE(DIFF < 0, DIFF, 0, 1.1, 0), COLORFF4466;
STICKLINE(DIFF < 0, DIFF, 0, 0.3, 0), COLORFF6666;
STICKLINE(DIFF >= 0, DIFF, 0, 3.2, 0), COLOR000055;
STICKLINE(DIFF >= 0, DIFF, 0, 2.9, 0), COLOR000077;
STICKLINE(DIFF >= 0, DIFF, 0, 2.4, 0), COLOR000099;
STICKLINE(DIFF >= 0, DIFF, 0, 1.8, 0), COLOR0000BB;
STICKLINE(DIFF >= 0, DIFF, 0, 1.1, 0), COLOR0000DD;
STICKLINE(DIFF >= 0, DIFF, 0, 0.3, 0), COLOR0000FF;
