我拿了一个MACD附图并移除了所有的柱状图、线条和柱状线。因此,剩下的只有红色地球的标志,表示二次金叉。还有在发生时会出现的“底背离”字样。你应该在市场开盘时或昨天收盘时寻找红色地球或底背离。
DIFF := EMA(CLOSE, 12) - EMA(CLOSE, 26); DEA := EMA(DIFF, 9); MACD := 5 (DIFF - DEA); 低位金叉 := CROSS(DIFF, DEA) AND DIFF < -0.1; DRAWTEXT(低位金叉, -0.1, '低位金叉'), COLORYELLOW; JCCOUNT := COUNT(CROSS(DIFF, DEA), BARSLAST(DEA >= 0)); 二次金叉 := CROSS(DIFF, DEA) AND DEA < 0 AND COUNT(JCCOUNT = 2, 21) = 1; DRAWICON(二次金叉, DEA 1.04, 13); DRAWTEXT(二次金叉, 0.66, '二次金叉'), COLORRED; A1 := BARSLAST(REF(CROSS(DIFF, DEA), 1)); 底背离 := REF(CLOSE, A1 + 1) > CLOSE AND DIFF > REF(DIFF, A1 + 1) AND CROSS(DIFF, DEA); DRAWTEXT(底背离, 0.30, '底背离'), COLORRED; A2 := BARSLAST(REF(CROSS(DEA, DIFF), 1)); 顶背离 := REF(CLOSE, A2 + 1) < CLOSE AND REF(DIFF, A2 + 1) > DIFF AND CROSS(DEA, DIFF);