- 精华
- 0
- 在线时间
- 161 小时
- UID
- 180855
- 积分
- 26
- 帖子
- 16
- 阅读权限
- 10
- 注册时间
- 2014-2-20
- 最后登录
- 2022-4-20
- 精华
- 0
- UID
- 180855
- 积分
- 26
- 帖子
- 16
- 主题
- 6
- 阅读权限
- 10
- 注册时间
- 2014-2-20
- 最后登录
- 2022-4-20
|
我的思路是每天临近收盘收场,之前的交易也没有出现问题,一些新的模型(只改了参数没有改其他代码)是周六晚上加载的,为什么周一早上开盘20秒左右就进行交易了呢,请管理员帮忙看看,谢谢!代码如下:
If(BarStatus==2)
{
if (MarketPosition==0 and sellshortcon and time<=0.16 And time>=0.14 And CurrentTime>=0.145950)
{
SellShort(0,close);
}
if (MarketPosition==-1 and buytocovercon and time<=0.16 And time>=0.14 And CurrentTime>=0.145950)
{
BuyToCover(0,Close);
}
}Else
{
if (MarketPosition==0 and sellshortcon and time<=0.16 And time>=0.14)
{
SellShort(0,close);
}
if (MarketPosition==-1 and buytocovercon and time<=0.16 And time>=0.14)
{
buytocover(0,Close);
}
}
|
|