以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://www.weistock.com/bbs/list.asp?boardid=4)
----  移动止盈问题  (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=163279)

--  作者:cdqwy781
--  发布时间:2018/5/7 20:11:10
--  移动止盈问题
移动止盈
             盈利大于5小于10个点,从最大盈利点回撤0.61,止盈;

盈利大于10小于20个点,从最大盈利点回撤0.5,止盈;

盈利大于20点,从最大盈利点回撤0.38,止盈。


  单帖管理 引用 | 回复 | 编辑 | 回到顶部
帅哥,在线噢!
yukizzc
  2楼信息 | 搜索 | 邮箱 | 主页 | UC


 加好友  发短信
等级:超级版主帖子:19118积分:0威望:0精华:1注册:2010/7/31 16:35:30
  发帖心情 Post By:2018/5/3 8:53:37 [只看该作者

variable:max_profit=0;

pp:=OPENPROFIT/(MULTIPLIER*abs(holding));

if pp>5 and pp<10 then max_profit:=1;

if max_profit=1 and (HHV(H,ENTERBARS)-CLOSE)/MULTIPLIER*abs(holding))>=0.61 then sell(1,holding,marketr);

 

 

if pp>10 and pp<20 then max_profit:=2;

if max_profit=2 and (HHV(H,ENTERBARS)-CLOSE)/MULTIPLIER*abs(holding))>=0.5 then sell(1,holding,marketr);


--  作者:cdqwy781
--  发布时间:2018/5/7 20:12:19
--  
老师编的这个显示编译错误引用的括号不完整