设为首页收藏本站

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

为啥系统自带范例,也用的是:Close呢? [复制链接]

Rank: 4

精华
0
UID
2276
积分
317
帖子
66
主题
20
阅读权限
50
注册时间
2008-9-4
最后登录
2008-10-20
跳转到指定楼层
1#
发表于 2008-9-5 09:17:51 |只看该作者 |倒序浏览
为啥系统自带范例,也用的是:Close呢?

Params
        Numeric FastLength( 12 );
        Numeric SlowLength( 26 );
        Numeric MACDLength( 9 );
        Numeric BuyLots(1);
Vars   
        NumericSeries MACDValue;
        NumericSeries AvgMACD;
        Numeric MACDDiff;
        Bool Condition1;
        Bool Condition2;
Begin
        MACDValue = XAverage( Close, FastLength ) - XAverage( Close, SlowLength ) ;       
        AvgMACD = XAverage(MACDValue,MACDLength);
        MACDDiff = MACDValue - AvgMACD;
        Condition1 = CrossOver(MACDValue, AvgMACD) ;
        Condition2 = MACDValue > 0;
        if (Condition1 And Condition2)
        {
                Buy(BuyLots,Close);
        }
End
交易开拓者交流
QQ-1群:38529330(已满)
QQ-2群:24771838

您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-5-19 12:01

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部