设为首页收藏本站

 找回密码
 注册
查看: 1352|回复: 0
打印 上一主题 下一主题

没有交易信号 [复制链接]

Rank: 2

精华
0
UID
21061
积分
89
帖子
54
主题
17
阅读权限
30
注册时间
2010-12-7
最后登录
2014-3-11
跳转到指定楼层
1#
发表于 2012-9-21 14:27:39 |只看该作者 |倒序浏览
Params
       Numeric LineRegLength(20);
        Numeric multiB(0.004);
        Numeric multiS(0.002);
        Numeric recBar(2);
        Numeric maxtime(3);       
        Numeric opentime(900);
        Numeric lasttime(1450);
        Numeric endtime(1458);
Vars
    NumericSeries LineValue(0);
        NumericSeries times(0);
        NumericSeries maxProfit(0);
Begin

if(CurrentBar>LineRegLength+1)
{
  LineValue=LinearRegValue(Close,LineRegLength,0);


}
Else
{
  LineValue=LineValue[1];

}


if (Time >= opentime/10000 + initime/10000 && Time <= lasttime/10000 && times < maxtime && MarketPosition == 0   )
{
        if(LineValue>LineValue[recBar]*(1+multiB))
        {
                Buy(1,open);
                times = times + 1;
        }
        if( LineValue<LineValue[recBar]*(1-multiS))
        {
                SellShort(1,open);
                times = times + 1;
        }
       

}




end







什么原因呢
您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-5-18 05:44

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部