以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  策略编写求助区  (http://weistock.com/bbs/list.asp?boardid=11)
----  [求助]5分钟K线策略  (http://weistock.com/bbs/dispbbs.asp?boardid=11&id=9700)

--  作者:olivendeng
--  发布时间:2012/1/18 15:35:30
--  [求助]5分钟K线策略

限制交易时间为9:05-14:55

 

以5分钟K线为基准
当价格超出上根K线最高价,做多。当随后价格跌破前一根K线最低价止损。
当价格跌破上根K线最低价,做空。当随后价格上破前一根K线最高价止损。

谢谢各位


--  作者:26327756l
--  发布时间:2012/1/18 15:43:07
--  

问题正在解决中


--  作者:rushtaotao
--  发布时间:2012/1/18 16:49:06
--  

if c>ref(h,1) then buy(holding=0,1,market);

 

if c<ref(l,1)  then sell(holding>0,market);
 
if c<ref(l,1)  then buyshort(holding=0,market);
 
if c>ref(h,1)  then sellshort(holding<0,market);


--  作者:olivendeng
--  发布时间:2012/1/19 9:05:31
--  

能解决吗?


--  作者:rushtaotao
--  发布时间:2012/1/19 13:25:39
--  

您试一下,这个应该可以达到要求

tt:=time>090500 and time<145500;


if c<ref(l,1)  and time then sell(holding>0,1,market);


if c>ref(h,1) and time then buy(holding=0,1,market);

 

if c>ref(h,1)  and time then sellshort(holding<0,1,market);
 
if c<ref(l,1)  and time then buyshort(holding=0,1,market);

 

楼主新手,推荐您看看帮助里的视频教程和文挡教程.