macd主图的代码
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

这是一个主图代码:macd有参数设定,参数参考图例DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA : EMA(DIFF,M);MACD : 2*(DIFF-DEA), COLORSTICK;macd1:=ref(macd,1);空:=macd1>0.5 and macdmacd;多:=macd1<-0.5 and macd>macd1 and ref(close>open,1) and diff

解答:

 DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);

DEA  : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
MACD1:=REF(MACD,1);
空:=FILTER(MACD1>0.5 AND MACD<MACD1 AND REF(CLOSE<OPEN,1) AND DIFF>MACD,5);
多:=MACD1<-0.5 AND MACD>MACD1 AND REF(CLOSE>OPEN,1) AND DIFF<MACD;
DRAWTEXT(空,2,'空'),COLORFFBB66; 
DRAWTEXT(多,-2,'多'),COLORRED;

选股票看什么指标最好 >股票指标网