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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请老师帮忙、、、谢谢

   

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


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

主题:请老师帮忙、、、谢谢

美女呀,离线,留言给我吧!
pyd
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:8439 积分:0 威望:0 精华:0 注册:2014/7/14 13:43:36
  发帖心情 Post By:2015/5/11 9:16:56    Post IP:58.246.57.26[显示全部帖子]

if d1 and d2 and d3 and d4 then buy(holding=0,1,marketr);
if enterbars>=0 then sell(holding>0,holding,market);
if k1 and k2 and k3 and k4 and k5 then buyshort(holding=0,1,market);
if enterbars>=0 then sellshort(holding<0,holding,market);

 回到顶部
美女呀,离线,留言给我吧!
pyd
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:8439 积分:0 威望:0 精华:0 注册:2014/7/14 13:43:36
  发帖心情 Post By:2015/5/11 9:49:39    Post IP:58.246.57.26[显示全部帖子]

if d1 and d2 and d3 and d4 then buy(holding=0,1,marketr);
if enterbars>=0 then sell(holding>0,holding,market);
if k1 and k2 and k3 and k4 and k5 then buyshort(holding=0,1,market);
if enterbars>=0 then sellshort(holding<0,holding,market);
 
只有这4句不会提示缺少begin end 你是不是其他地方用了begin 少写了end?

把全部代码贴下

market是市价下单,thisclose是对手价,单根还是下跟下单取决于你是选择走完一根k还是固定时间间隔

[此贴子已经被作者于2015/5/11 9:50:16编辑过]

 回到顶部