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


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

   

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


  共有4664人关注过本帖树形打印复制链接

主题:后台交易问题

帅哥哟,离线,有人找我吗?
系统使用者
  21楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:808 积分:667 威望:0 精华:0 注册:2011/4/9 16:17:57
  发帖心情 Post By:2017/3/28 13:56:39    Post IP:222.211.182.172[显示全部帖子]

cc809008322:=holding;
if not(islastbar) or workmode<>1 then exit;
xiadan809008322:=cc809008322-hold;
if not(islastbar) or workmode<>1 then exit;
xiadan809008322:=cc809008322-hold;
if xiadan809008322>0.5 then begin
 cang:=min(xiadan809008322,abs(hold));
 if hold<0 and enterbars>1 and H>=zs then begin
  MyTPrice :=IF(OPEN>zs,OPEN,zs);
  tsellshort(1,ss,LMT,MyTPrice+MINDIFF,0,'809008322');
 end
 cang:=xiadan809008322+min(hold,0);
 if cang>0 and H>=UpperBand and BLIQCON then begin
  MyPrice :=IF(OPEN>UpperBand,OPEN,UpperBand);
  tbuy(1,ss,LMT,MyTPrice+MINDIFF,0,'809008322');
 end
end
if xiadan809008322<-0.5 then begin
 cang:=min(abs(xiadan809008322),abs(hold));
 if hold>0  and tenterbars>1 and L<=zs then begin
  MyTPrice :=IF(OPEN<zs,OPEN,zs);
  tsell(1,ss,LMT,MyTPrice-MINDIFF,0,'809008322');
 end
 cang:=abs(xiadan809008322)-max(hold,0);
 if cang>0 and L<=LowerBand and SOPCON then begin
  MyPrice :=IF(OPEN<LowerBand,OPEN,LowerBand);
  tbuyshort(1,ss,LMT,MyTPrice-MINDIFF,0,'809008322');
 end
end
hold:=cc809008322;
这样还是不行,油焖

 回到顶部
帅哥哟,离线,有人找我吗?
系统使用者
  22楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:808 积分:667 威望:0 精华:0 注册:2011/4/9 16:17:57
  发帖心情 Post By:2017/3/28 14:03:56    Post IP:222.211.182.172[显示全部帖子]

完全按这改写的,不知道错误在哪里?
实例二、即时下单模型(固定时间间隔)
Globalvariable:hold=drawnull;
//蓝色部分改为你自己的模型
buycond:=h>ref(hhv(h,10),1);
sellcond:=l<ref(llv(l,10),1);
if holding>0 and sellcond then sell(1,1,market);
if holding<0 and buycond then sellshort(1,1,market);
if holding=0 and buycond then buy(1,1,market);
if holding=0 and sellcond then buyshort(1,1,market);
cc800988:=holding;//这句放在信号稳定的地方

drawtextex(1,1,800,0,'虚拟持仓为:'+numtostr(cc800988,0));//在图表上输入虚拟持仓以便监控
if not(islastbar) or workmode<>1 then exit;
xiadan800988:=cc800988-hold;
if xiadan800988>0.5 then begin
 cang:=min(xiadan800988,abs(hold));
 if hold<0 then begin
  tsellshort(1,cang,mkt,0,0,'800988'),allowrepeat;
  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平空 %.0f',cang);
 end
 cang:=xiadan800988+min(hold,0);
 if cang>0 then begin
  tbuy(1,cang,mkt,0,0,'800988'),allowrepeat;
  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 开多 %.0f',cang);
 end
end
if xiadan800988<-0.5 then begin
 cang:=min(abs(xiadan800988),abs(hold));
 if hold>0 then begin
  tsell(1,cang,mkt,0,0,'800988'),allowrepeat;
  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平多 %.0f',cang);
 end
 cang:=abs(xiadan800988)-max(hold,0);
 if cang>0 then begin
  tbuyshort(1,cang,mkt,0,0,'800988'),allowrepeat;
  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 开空 %.0f',cang);
 end
end
hold:=cc800988;


 回到顶部
帅哥哟,离线,有人找我吗?
系统使用者
  23楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:808 积分:667 威望:0 精华:0 注册:2011/4/9 16:17:57
  发帖心情 Post By:2017/3/28 14:04:15    Post IP:222.211.182.172[显示全部帖子]

if not(islastbar) or workmode<>1 then exit;

 

删掉这句,还是不行


 回到顶部
帅哥哟,离线,有人找我吗?
系统使用者
  24楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:808 积分:667 威望:0 精华:0 注册:2011/4/9 16:17:57
  发帖心情 Post By:2017/3/28 14:05:41    Post IP:222.211.182.172[显示全部帖子]

是否与我前面的声明变量问题?
variable: aspect=0, stopprice=0, dm=0, zs=0, maxhl=0, MyPrice=0, MyTPrice=0; 

 回到顶部
帅哥哟,离线,有人找我吗?
系统使用者
  25楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:808 积分:667 威望:0 精华:0 注册:2011/4/9 16:17:57
  发帖心情 Post By:2017/3/28 14:42:28    Post IP:222.211.182.172[显示全部帖子]

阿火秘籍里面的,后台模式

 回到顶部
总数 26 上一页 1 2 3