以文本方式查看主题

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

--  作者:ooooo
--  发布时间:2016/11/1 15:47:14
--  成本价
老师:
      比如现在开仓价格是100点,在5分钟周期内
      1;如果行情先朝有利的方向移动,那么当行情返回开仓价格平仓
       2:如果行情朝不利的方向移动,那么亏损10点位平仓

      

--  作者:jinzhe
--  发布时间:2016/11/1 15:58:54
--  

if hhv(h,enterbars+1)>enterprice and c<=enterprice then sell(1,0,limitr,enterprice),ignorecheck;

if llv(l,enterbars+1)<enterprice and c>=enterprice then sellshort(1,0,limitr,enterprice),ignorecheck;

if c<enterprice-10 then sell(1,0,market);

if c>enterprice+10 then sellshort(1,0,market);