- 精华
- 0
- 在线时间
- 43 小时
- UID
- 248246
- 积分
- 66
- 帖子
- 33
- 阅读权限
- 30
- 注册时间
- 2017-3-7
- 最后登录
- 2019-6-13
- 精华
- 0
- UID
- 248246
- 积分
- 66
- 帖子
- 33
- 主题
- 25
- 阅读权限
- 30
- 注册时间
- 2017-3-7
- 最后登录
- 2019-6-13
|
第一秒为什么会自动交易
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 |
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
|