以文本方式查看主题

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

--  作者:free6188
--  发布时间:2011/9/22 10:27:41
--  求助高手

求助一个可以在标准版上进行图表交易的止盈策略:

 

             10个交易周期内,最高价/最低价 >1.05  ,自动止盈平仓。

 

谢谢!


--  作者:fly
--  发布时间:2011/9/22 10:55:00
--  

只写,10个交易周期内,最高价/最低价 >1.05  ,自动平仓的示例.

其他部分,请您去学习一下,论坛置顶视频教程.

....

....

....

H10:=ref(hhv(high,10),1);

L10:=ref(llv(low,10),1);

 

buy(holding=0,1,thisclose);

 

SELL(ENTERBARS>10 AND H10/L10>1.05 AND HOLDING>0,1,MARKET);

....

....

....


--  作者:xian_0_9
--  发布时间:2011/9/22 11:01:22
--  
h20:=ref(hhv(h,20),1);
aa:=enterbars>=1 and enterbars<=10 and holding>0 and h/l>1.05 ;
bb:=enterbars>10 and holding>0;
if aa or bb then sell(1,1,limitr,c);
if c>h20 and holding=0 then buy(1,1,limitr,c);