欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 后台交易不成交

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2244人关注过本帖平板打印复制链接

主题:后台交易不成交

帅哥哟,离线,有人找我吗?
fxrock4
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:663 积分:0 威望:0 精华:0 注册:2015/4/15 11:40:17
后台交易不成交  发帖心情 Post By:2016/7/18 9:47:06    Post IP:222.217.222.209[只看该作者]

Globalvariable:hold=drawnull;
cc612799:=holding;//这句放在信号稳定的地方
//模型
//省略
drawtextex(1,1,800,0,'虚拟持仓为:'+numtostr(cc612799,0));//在图表上输入虚拟持仓以便监控
if not(islastbar) or workmode<>1 then exit;
xiadan612799:=cc612799-hold;
if xiadan612799>0.5 then begin
 cang:=min(xiadan612799,abs(hold));
 if hold<0 then begin
  tsellshort(1,cang,mkt,0,0,'612799'),allowrepeat;
  debugfile('D:\612799.txt',numtostr(hold,0)+' '+numtostr(cc612799,0)+' 平空 %.0f',cang);
 end
 cang:=xiadan612799+min(hold,0);
 if cang>0 then begin
  tbuy(1,cang,mkt,0,0,'612799'),allowrepeat;
  debugfile('D:\612799.txt',numtostr(hold,0)+' '+numtostr(cc612799,0)+' 开多 %.0f',cang);
 end
end
if xiadan612799<-0.5 then begin
 cang:=min(abs(xiadan612799),abs(hold));
 if hold>0 then begin
  tsell(1,cang,mkt,0,0,'612799'),allowrepeat;
  debugfile('D:\612799.txt',numtostr(hold,0)+' '+numtostr(cc612799,0)+' 平多 %.0f',cang);
 end
 cang:=abs(xiadan612799)-max(hold,0);
 if cang>0 then begin
  tbuyshort(1,cang,mkt,0,0,'612799'),allowrepeat;
  debugfile('D:\612799.txt',numtostr(hold,0)+' '+numtostr(cc612799,0)+' 开空 %.0f',cang);
 end
end
hold:=cc612799;

不知道哪里出问题

 回到顶部