设为首页收藏本站

 找回密码
 注册
楼主: 穿堂风
打印 上一主题 下一主题

国外成熟策略R-Breaker分享,提供翻译后的TB源码,日内系统 [复制链接]

Rank: 4

精华
0
UID
87653
积分
330
帖子
59
主题
15
阅读权限
50
注册时间
2011-12-20
最后登录
2021-8-18
1#
发表于 2012-1-21 17:19:04 |显示全部楼层
if(hitoday>=ssetup and marketposition>-1 and GetGlobalVar(1)<1)

        {

                If(Low<=(senter+(hitoday-ssetup)/div))

                {

                        SellShort(1,senter+(hitoday-ssetup)/div);

                        SetGlobalVar(1,Time);

                        Return;

                }

        }

        if(ltoday<=bsetup and marketposition<1  and GetGlobalVar(1)<1)

        {

                If(High>=(benter-(bsetup-ltoday)/div))

                {

                        Buy(1,benter-(bsetup-ltoday)/div);

                        SetGlobalVar(1,Time);

                        Return;

                }

        }

这一段可能会出现同一根BAR既满足high值高于ssetup,又满足Low<=(senter+(hitoday[1]-ssetup)/div)的情况,但实际无法判断先后。

改成
        if(hitoday[1]>=ssetup and marketposition>-1 and GetGlobalVar(1)<1 &&date==date[1])
        {
                If(Low<=(senter+(hitoday[1]-ssetup)/div))
                {
                        SellShort(1,senter+(hitoday[1]-ssetup)/div);
                        SetGlobalVar(1,Time);
                        Return;
                }
        }
        if(ltoday[1]<=bsetup and marketposition<1  and GetGlobalVar(1)<1 &&date==date[1])
        {
                If(High>=(benter-(bsetup-ltoday[1])/div))
                {
                        Buy(1,benter-(bsetup-ltoday[1])/div);
                        SetGlobalVar(1,Time);
                Return;
                }
        }
这样子会不会好一点?还有后面的if(marketposition==0)那一段貌似也得加上跳空判断~

不过话说这个策略非常不错~感谢穿大大分享

使用道具 举报

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

bottom

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

GMT+8, 2024-5-4 21:03

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部