以文本方式查看主题

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

--  作者:15888934996
--  发布时间:2016/11/22 11:24:22
--  关于移动止损问题
老师好,,我想问下,,,( 盈利超过1%以后,价格回到成本价止损) 该怎么编写  我是初级图表程序化   
--  作者:jinzhe
--  发布时间:2016/11/22 11:31:53
--  

if (hhv(h,enterbars+1)-enterprice)/enterprice>=0.01 and l<=enterprice then sell(1,0,market);

if (enterprice-llv(l,enterbars+1))/enterprice>=0.01 and h>=enterprice then sellshort(1,0,market);