设为首页收藏本站

 找回密码
 注册
查看: 919|回复: 1

为什么自己编的应用公式在急速版上可以有信号,在旗舰版上没有信号 [复制链接]

Rank: 2

精华
0
UID
248246
积分
66
帖子
33
主题
25
阅读权限
30
注册时间
2017-3-7
最后登录
2019-6-13
发表于 2018-11-8 11:30:17 |显示全部楼层
为什么自己编的应用公式在急速版上可以有信号,在旗舰版上没有信号
//------------------------------------------------------------------------
// 简称: DUANXIAN
// 名称: DUANXIAN
// 类别: 公式应用
// 类型: 用户应用
// 输出: Void
//------------------------------------------------------------------------
Params
        //此处添加参数

Vars
        //此处添加变量

Begin
        //此处添加代码正文

       
        //多开
             if(barstatus==0)setglobalvar(0,0);
if(barstatus==0)setglobalvar(1,0);
        // if (Q_Last==Q_AskPrice)
       

if(Q_OutsideVol>GetGlobalVar(0) and (Q_LastVol()>0 and  Q_OpenIntFlag>0))
      {
      buy(1,Q_Last);   
      }
     
      //空开
// if (Q_Last==Q_BidPrice)
        

if(Q_InsideVol>GetGlobalVar(1) and (Q_LastVol()>0 and  Q_OpenIntFlag>0))      
{
       SellShort(1,Q_Last);
       }
     
       
         //平仓
         if(A_BuyPosition()>0 )
         {
        sell(1,A_BuyAvgPrice+1);
}       
         if(A_SellPosition>0)
         {
        BuyToCover(1,A_SellAvgPrice-1);
       }
       //止损
   
     
      
        /* if (Q_LastTime+0.003<=Time)
         {If(A_GetOpenOrderCount()>0) {
(A_OpenOrderContractNo());
        BuyToCover(1,Q_Last);
         sell(1,Q_Last);
        }}*/
        setglobalvar(0,Q_OutsideVol);
         setglobalvar(1,Q_InsideVol);
End
//------------------------------------------------------------------------
// 编译版本:        2018/09/25 122512
// 内核版本:        V2.8.2.14
// 版权所有        kingofdragon1
// 更改声明        TradeBlazer Software保留对TradeBlazer平台
//                        每一版本的TradeBlazer公式修改和重写的权利
//------------------------------------------------------------------------

Rank: 1

精华
0
UID
226438
积分
5
帖子
5
主题
0
阅读权限
10
注册时间
2016-1-8
最后登录
2022-4-14
发表于 2018-11-11 11:51:25 |显示全部楼层
应该加个bar==2

使用道具 举报

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

bottom

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

GMT+8, 2024-3-28 19:08

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部