编写要求:
1.macd绿柱面积相比之前缩小,2.绿柱子逐渐缩短,3.日期可调,选出N日内最短绿柱;
www.gszx.com.cn网解答:
N:=9;{设置成可调参数} DIF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIF,9); MACD:=(DIF-DEA)*2; XG:HHV(MACD,N)=MACD AND EVERY(MACD>REF(MACD,1),N) and MACD<0;