设为首页收藏本站

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

请教:如何建立sar策略 [复制链接]

Rank: 1

精华
0
UID
46881
积分
16
帖子
4
主题
2
阅读权限
10
注册时间
2011-6-13
最后登录
2019-7-11
跳转到指定楼层
1#
发表于 2012-11-13 16:59:44 |只看该作者 |倒序浏览
Params
        Numeric AfStep( 0.02);
        Numeric AfLimit( 0.2 ) ;
Vars
        NumericSeries oParCl( 0 );
        NumericSeries oParOp( 0 );
        NumericSeries oPosition( 0 );
        NumericSeries oTransition( 0 );
                NumericSeries A;
                NumericSeries sar;
Begin
     ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;
        PlotNumeric( "ParCl" , oParCl) ;
                                if (o>oParCl[1])
        {
        Buy(1,o);            
        }
        
        if (o<oParCl[1])
        {
        SellShort(1,o);
        }
       
End

这样为啥不行?能在图上显示oparcl,但这个数据不能用。

Rank: 1

精华
0
UID
1062560
积分
3
帖子
3
主题
0
阅读权限
10
注册时间
2021-5-14
最后登录
2021-10-10
2#
发表于 2021-10-7 14:23:23 |只看该作者
oParCl只能是数值型变量,不能回溯

使用道具 举报

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

bottom

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

GMT+8, 2024-4-21 00:16

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部