Rss & SiteMap

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

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

标题:求一个策略的编写

1楼
zhou1980 发表于:2014/12/2 9:40:47
1,收盘价突破前3日的高点,平空开多。
2,收盘价突破前3日的低点,平多开空。
3,开仓后的第3个K线的收盘价平仓离场,如果此时满足1或者2的条件就不平仓。
2楼
pyd 发表于:2014/12/2 9:49:58
if c>hhv(h,3) then begin
 sellshort(holding<0,holding,market);
buy(holding=0,1,market);
end
if c<llv(l,3) then begin 
sell(holding>0,holding,market);
buyshort(holding=0,1,market);
end
if enterbars>=3  then begin
sellshort(holding<0,holding,market);
sell(holding>0,holding,market);
end
3楼
zhou1980 发表于:2014/12/2 9:55:28
如果此时满足1或者2的条件就不平仓。

这个条件还没有实现
4楼
yukizzc 发表于:2014/12/2 10:03:59

条件1:=c>hhv(h,3) ;

条件2:=c<llv(l,3);

if enterbars>=3  and not(条件1 or 条件2) then begin
sellshort(holding<0,holding,market);
sell(holding>0,holding,market);
end

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


Powered By Dvbbs Version 8.3.0
Processed in 0.01465 s, 2 queries.