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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 阿火模板不下单,后台的.

   

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


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

主题:阿火模板不下单,后台的.

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


加好友 发短信 机器猫
等级:论坛游侠 帖子:243 积分:557 威望:0 精华:0 注册:2011/9/23 21:49:31
阿火模板不下单,后台的.  发帖心情 Post By:2013/7/26 10:44:48    Post IP:218.26.228.76[只看该作者]

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;

这个是模板,为什么加上去不下单呢,是不是3.0修改了什么呀


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2013/7/26 10:54:36    Post IP:58.246.57.26[只看该作者]

阿火的代码里面,有的思路我总是看不太懂,你直接私信下阿火看看。。。


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
wdbbs
  3楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 机器猫
等级:论坛游侠 帖子:243 积分:557 威望:0 精华:0 注册:2011/9/23 21:49:31
  发帖心情 Post By:2013/7/26 11:07:49    Post IP:218.26.228.76[只看该作者]

阿火都连系不上呀

 回到顶部
帅哥哟,离线,有人找我吗?
王锋
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2013/7/26 11:11:01    Post IP:60.55.8.253[只看该作者]



金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
wdbbs
  5楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 机器猫
等级:论坛游侠 帖子:243 积分:557 威望:0 精华:0 注册:2011/9/23 21:49:31
  发帖心情 Post By:2013/7/26 11:29:29    Post IP:60.223.237.182[只看该作者]

又是一个BUG呀,那为什和2.95也不能用呀

 回到顶部