以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  请教加仓语句的编写  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=99772)

--  作者:bbbcccaaa
--  发布时间:2016/6/29 9:47:24
--  请教加仓语句的编写
刚搜了下。没找到答案。
请问,:1.开仓后盈利30点就加仓一手,然后加仓的这一手亏10个点就平仓。如何写?
            2.标准板图形程序化能用这种加仓吗?
谢谢。
           

--  作者:jinzhe
--  发布时间:2016/6/29 10:05:55
--  

1.

variable:bj=0;

if openprofit/multiplier>30 and bj=0 and holding>0 then begin

    sell(1,0,market);

    bj:=1;

end

 

if bj=1 and c<enterprice-10 and holding>0 then begin

    sell(1,0,market);

    bj:=0;

end

 

2.可以