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


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

   

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


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

主题:[求助]

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


加好友 发短信
等级:新手上路 帖子:25 积分:0 威望:0 精华:0 注册:2016/9/8 10:44:39
[求助]  发帖心情 Post By:2016/9/21 10:35:43    Post IP:221.4.54.93[显示全部帖子]

设定 x 的止盈线,设定x1 的止损线, 过滤条件为波幅 30 点。

这样写对吗,总是符号搞错
if c>enterprice*(1+x)  and holding>0 then sell(1,0,marketr);//多头止盈
if c<enterprice*(1-x1) and holding>0 then sellshort(1,0,marketr);//止损多头

if c<enterprice*(1+x)  and holding<0 then sellshort(1,0,marketr);///空头止盈
if c>enterprice*(1-x1) and holding<0 then sell(1,0,marketr);//止损空头


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


加好友 发短信
等级:新手上路 帖子:25 积分:0 威望:0 精华:0 注册:2016/9/8 10:44:39
  发帖心情 Post By:2016/9/21 10:47:54    Post IP:221.4.54.93[显示全部帖子]

if c>enterprice*(1+x) and holding>0 then sell(1,0,marketr);//多头止盈
if c<enterprice*(1-x1) and holding<0 then sell(1,0,marketr);//止损多头
if c<enterprice*(1+x) and holding<0 then sellshort(1,0,marketr);///空头止盈
if c>enterprice*(1-x1) and holding>0 then sellshort(1,0,marketr);//止损空头
能不能在进行止盈或者止损以后再不进行开仓操作,直到进行平仓
if time>=150000 then begin
收盘平多:sell(1,手数,market);
收盘平空:sellshort(1,手数,market);
end

 回到顶部