编写条件:
编写方法:
网友求助:
条件 macd指标 DIFF上交DEA 在主图满足条件当天k线处画一条收盘线,线段保留5天(如不可,可直接画条直线也可以)
附上MacD指标
{MACD}
DIFF:=EMA(CLOSE,9)-EMA(CLOSE,21);
DEA:=EMA(DIFF,6);
MACD:=2*(DIFF-DEA);
解答如下:
DIFF:=EMA(CLOSE,9)-EMA(CLOSE,21);
DEA:=EMA(DIFF,6);
aa:=cross(DIFF,DEA);
t:=BArslAST(aa);
tt:=if(t<=4,t,0);
HORILINE(aa,c,tt<ref(tt,1) );