- 精华
- 0
- 在线时间
- 9 小时
- UID
- 74401
- 积分
- 46
- 帖子
- 5
- 阅读权限
- 10
- 注册时间
- 2011-10-26
- 最后登录
- 2013-4-2
- 精华
- 0
- UID
- 74401
- 积分
- 46
- 帖子
- 5
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2011-10-26
- 最后登录
- 2013-4-2
|
条件判定 股指5分钟K线图做多 如果收盘前1分钟,如果价格低于开仓价时,平仓,否则留仓过夜。代码如下,为什么不给出平仓信号?问题出在呢里?
if(Date==CurrentDate&&Time==0.1510 && MarketPosition==1&&CurrentTime>=0.1514)
{MyEntryPrice = AvgEntryPrice;
if(Close<MyEntryPrice)
{Sell(Lots, Close);
}
}
如果留仓过夜,第二天开盘价格如果低于开仓价时,平仓。否则继续持有,代码如下,为什么不能给出平仓信号?问题出在呢里?
If(BarStatus==2 && Time==0.091500 && High==Low)
{return;
}
if (MarketPosition==1&&Date==CurrentDate&&Time==0.0915&&CurrentTime<=0.0915)
{ MyEntryPrice = AvgEntryPrice;
if (open<MyEntryPrice) {
Sell(Lots,open);
}
} |
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
|