设为首页收藏本站

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

请问为什么求出的极值不是日内的极值? [复制链接]

Rank: 5Rank: 5

精华
0
UID
7277
积分
938
帖子
207
主题
44
阅读权限
60
注册时间
2010-3-11
最后登录
2016-5-4
跳转到指定楼层
1#
发表于 2013-1-30 16:29:27 |只看该作者 |倒序浏览
Params
        Numeric n(10);
Vars
         NumericSeries ma201;
         NumericSeries ma202;
         NumericSeries ReBars;
         NumericSeries ma20;
         NumericSeries mah20;
         NumericSeries mah202;

         
Begin       

        If(CurrentBar == 0 || Date != Date[1])
        {
                ReBars = 0;
        }Else
        {
                ReBars = ReBars + 1;
        }  
        ma201=Average(Close,n);
        ma202=Average(Close,ReBars+1);
       
        if(ReBars>=n)//求日内MA20
        {
            ma20=ma201;
        }else
        If(ReBars<n)
        {
            ma20=ma202;
        }       

        mah20=NthHigher(ma20,ReBars,2);
        mah202=NthHigher(ma20,ReBars,1);
        Commentary("ReBars=:"+Text(ReBars));
        PlotNumeric("ma20",ma20);                                        
                if(mah20>0)PlotNumeric("mah20",mah20);
        if(mah202>0)PlotNumeric("mah202",mah202);
end
请问为什么求出的极值不是日内的极值?
您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-5-3 20:40

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部