在线检测未来函数

macd主图的代码

来源:Internet,编辑:股旁网,2012-07-16

编写条件:

这是一个主图代码: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编写方法:

&nbsp;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;

相关文章