multipler:=10;
macd:=stkindi('','macd.macd1',0,datatype);
diff:=stkindi('','macd.diff',0,datatype);
atr:=stkindi('','atr.atr',0,datatype);
if cross(macd,0) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if cross(0,macd) then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
if openprofit/multipler>1.5*atr then begin
sell(1,0,marketr);
sellshort(1,0,market);
end
if openprofit<0 and abs(openprofit)/multipler>1.5*atr then begin
sell(1,0,marketr);
sellshort(1,0,market);
end
以上是源码,在1天 5分钟等周期上,是正常的
但是在75分钟周期上,信号就会延迟,就是说,满足开仓条件过了1,2根K线,才会开仓,是为什么?