编写要求:
公式在线网解答:
网友求助:
平时的MACD代码是
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA);
还请高手帮我编写这样一个MACD组合选股公式,上次金叉DIFF<0,这次金叉DIFF>0,在第二次金叉那天选出来
如图:
解答如下:
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);
DEA := EMA(DIFF,9);
zg:CROSS(diff,dea) AND dea>0 AND BARSLAST(CROSS(diff,dea) AND dea<0);