 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- gxx978
|
参考如下,后台回测是需要使用后台的精细化历史测评的功能的。
input:n1(5,1,100,1),n2(20,1,100,1);
//
bpkcond:="trend.bpkcond##min15(n1,n2)";
spkcond:="trend.spkcond##min15(n1,n2)";
////***********************************//lotss定义//***********************************//
lots:=max(round((20*10000/(oclose*multiplier))),1);
//***********************************//交易条件//***********************************//
//交易系统
//trader_time:=time>=010000 and time<=010300;
trader_time:=time>=185700 and time<=190000;
//
if trader_time then begin
if bpkcond then begin
tsellshort(tsellholdingex('','',2)>0,0,lmt,open);
tbuy(tbuyholdingex('','',2)=0,lots,lmt,open);
end
if spkcond then begin
tsell(tbuyholdingex('','',2)>0,0,lmt,open);
tbuyshort(tsellholdingex('','',2)=0,lots,lmt,open);
end
end
|
|