Rss & SiteMap

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

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

标题:[原创]求助,编写一小策略

1楼
木鱼石传说 发表于:2013/6/28 11:17:41

请老师指点一下下面日线周期的策略应该如何编写:


开多条件:


出现一个20日最高价后,在接下来的10天之内出现一个5日最低价,

满足上述两条件后,于下一根K线的开盘价开多;

持仓8天后,不论盈亏平仓退出交易


开空条件


出现一个20日最低价后,在接下来的10天之内出现一个5日最高价,

满足上述两条件后,于下一根K线的开盘价开空;

持仓8天后,不论盈亏平仓退出交易

2楼
jinzhe 发表于:2013/6/28 11:19:17
请稍等,工作人员编写中
3楼
木鱼石传说 发表于:2013/6/28 13:06:46
等待中,谢谢
4楼
jinzhe 发表于:2013/6/28 13:35:22

cond_buy:any(l<ref(llv(l,5),1),10)<>0 and ref(h>ref(hhv(h,20),1),10);

if ref(cond_buy,1) then buy(holding=0,1,limitr,o) ;

if enterbars>=8 then sell(holding>0,0,thisclose);

cond_sell:any(H>ref(hhv(h,5),1),10)<>0 and ref(l<ref(llv(l,20),1),10);

if ref(cond_sell,1) then buyshort(holding=0,1,limitr,o);

if enterbars>=8 then sellshort(holding<0,0,thisclose);

5楼
木鱼石传说 发表于:2013/6/28 15:32:43
谢谢
共5 条记录, 每页显示 10 条, 页签: [1]


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