
等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
F8公式:
MACD0 :=C,NODRAW;
T10:=ZIG(MACD0,X/10);
运行公式采用:T10:="F8.T10";short: (CROSS(MACD8,T10)),NODRAW;//&&MACD>=RMACD;
long:(CROSS(T10,MACD8)),NODRAW;//&&MACD<RMACD;
if holding>=0 and short=1 then begin//LONGEND||
ac:='';//下单账户
buyhold:=tbuyholdingex(ac,平代码,1);
sellhold:=tsellholdingex(ac,开代码,1);
Tsell(holding>0&&buyhold<>0,Lots,mkt,平代码);
sell(holding>0,Lots,MARKET);
Tbuyshort(holding=0&&sellhold=0,Lots,mkt,开代码);
buyshort(holding=0,Lots,MARKET);
end
if holding<=0 and long=1 then begin//SHORTEND||
ac:='88897558';//下单账户
buyhold:=tbuyholdingex(ac,开代码,1);
sellhold:=tsellholdingex(ac,平代码,1);
Tsellshort(holding<0&&sellhold<>0,Lots,mkt,平代码);
sellshort(holding<0,Lots,MARKET);
Tbuy(holding=0&&buyhold=0,Lots,mkt,开代码);
buy(holding=0,Lots,MARKET);
end
问题:1、有的策略有信号,有没没有。2、运行过程有时候有,有时候没有。3、后台回测也一样。
|
|