设为首页收藏本站

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

第一秒为什么会自动交易 [复制链接]

Rank: 2

精华
0
UID
248246
积分
66
帖子
33
主题
25
阅读权限
30
注册时间
2017-3-7
最后登录
2019-6-13
跳转到指定楼层
1#
发表于 2018-11-7 14:47:11 |只看该作者 |倒序浏览
第一秒为什么会自动交易


Begin
        //此处添加代码正文

       
        //多开
                      if(barstatus==0)setglobalvar(0,0);
if(barstatus==0)setglobalvar(1,0);
        // if (Q_Last==Q_AskPrice)
        if (Q_LastVol()>1000 and  Q_OpenIntFlag>0)
        {       

if(Q_OutsideVol>GetGlobalVar(0))
     
      {
      buy(1,Q_Last);     
      }
      }
      //空开
// if (Q_Last==Q_BidPrice)
        if (Q_LastVol()>1000 and  Q_OpenIntFlag>0)
   
      {
          if(barstatus==0)setglobalvar(1,0);
if(barstatus==0)setglobalvar(0,0);
if(Q_InsideVol>GetGlobalVar(1))      
      {
       SellShort(1,Q_Last);
       }
      }
       
         //平仓
         if(A_BuyPosition()>0 )
         {
        sell(1,A_BuyAvgPrice+1);
}       
         if(A_SellPosition>0)
         {
        BuyToCover(1,A_SellAvgPrice-1);
       }
      end
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-5-8 08:23

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部