dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2,colorstick;xg:count(c/ref(c,1)>1.07,120)>=2 and last(macd<ref(macd,1) and macd<0,7,1) and macd>ref(macd,1);这个是第二个的选股公式...
dif:ema(close,short)-ema(close,long);dea:ema(dif,mid);macd:(dif-dea)*2,colorstick;缩短:ref(macd,1)>0 and macd<=0 and macd<ref(macd,1); 不能是将要变绿柱,而是一变绿条件成立,“缩短为1如果是要将要变就显示只用未来函数,这样就没有实际价值了。
diff:=ema(close,12)-ema(close,26);{什么是diff,macd参数12,26,9} dea:=ema(diff,9);{什么是dea} macd:=2*(diff-dea);{什么是macd};macd>ref(macd,1){比较前面第1日} and ref(macd,1)>ref(macd,2);{比较前面第2日};