t1:=c>o and c/ref(c,1)<1.05;t2:=v/capital*100<10 and v<ref(v,1);diff:=ema(close,12)-ema(close,26);dea:=ema(diff,9);macd:=2*(diff-dea);t3:=macd>0.5;tx:=t1 and t2 and t3;xg:ex**t(tx,1);
原码如下:dif:=ema(close,250)-ema(close,1000);dea:=ema(dif,9);macd:=(dif-dea)*2;dea>0 and cross(dif,dea) and c>ref(c,1);{周期参数是接你说的长期设置的}ps:你的问题表达不明,你应该是想表达说,macd零轴上金叉并且今日收盘价大于昨日收盘价