为什么我用模拟账号来后台交易,开平仓都能同时发出执行, 用实盘的账号登陆后就不能同时开平仓了?
我是用了后台模板来执行的
Globalvariable:hold=drawnull;
cc800988:=holding;//这句放在信号
。。。。。。
<< 我的策略>>
。。。。。。。
drawtextex(1,1,800,0,'虚拟持仓为:'+numtostr(cc800988,0));//在图表上输入虚拟持仓以便监控
if not(islastbar) or workmode<>1 then exit;
xiadan800988:=cc800988-hold;
t1:=floor(time/100);
if islastbar and time <151400 and xiadan800988>0.5 and t1<>extgbdata('time') then then begin
cang:=min(xiadan800988,abs(hold));
if hold<0 and tholding<0 then begin
tsellshort(1,cang,mkt,0,0),ALLOWREPEAT;
//end
//cang:=xiadan800988+min(hold,0);
//if cang>0 and tholding=0 then begin
tbuy(1,cang,mkt,0,0),ALLOWREPEAT;
end
extgbdataset('time',t1);
end
if ISLASTBAR and time<151400 and xiadan800988<-0.5 and t1<>extgbdata('time') then begin
cang:=min(abs(xiadan800988),abs(hold));
if hold>0 and tholding>0 then begin
tsell(1,cang,mkt,0,0),ALLOWREPEAT;
//end
// cang:=abs(xiadan800988)-max(hold,0);
//if cang>0 and tholding=0 then begin
tbuyshort(1,cang,mkt,0,0),ALLOWREPEAT;
end
extgbdataset('time',t1);
end
hold:=cc800988;
if time>151400 and tholding<>0 then begin
tsellshort(1,0,mkt,0,0);
tsell(1,0,mkt,0,0);
end
我预警监控里面显示发出单子了,价格为0 ,应该是没有成交,可是我的快期里面没有显示有委托单,
我不知道这是不是软件的问题??
金字塔后台模拟交易 和实盘交易 原理是一样的吗??
我的模拟交易时正常的,可以同时开平仓的,实盘交易的话就不行了,只能平仓
下单日志这个必须要有的,记录了吗?
没有呢