Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:老师,帮写一下这策略

1楼
AK之王 发表于:2016/5/5 16:15:24
如果条件1成立则买入1手,亏三个波动单位止损,条件2成立平仓,平仓后价格往上波动5个单位后再次买入(追涨),追涨部分亏5个波动单位止损,追涨部分条件3成立平仓。
2楼
jinzhe 发表于:2016/5/5 16:56:03

variable:bj=0;

if cond1and bj=0 and holding=0 then begin

     buy(holding=0,1,marketr);

     bj:=1;

end

if c<enterprice-3*mindiff and holding>0 and bj=1 then sell(1,0,marketr);

if cond2 and holding>0 and bj=1 then sell(1,0,marketr);

if holding=0 and c>exitprice+5*mindiff and bj=1 then begin

     buy(1,1,marketr);

     bj:=0;

end

if  bj=0 and holding>0 and cond3 then sell(1,0,marketr);

 

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02734 s, 3 queries.