- 精华
- 0
- 在线时间
- 144 小时
- UID
- 264292
- 积分
- 27
- 帖子
- 16
- 阅读权限
- 10
- 注册时间
- 2018-4-10
- 最后登录
- 2020-11-2
- 精华
- 0
- UID
- 264292
- 积分
- 27
- 帖子
- 16
- 主题
- 8
- 阅读权限
- 10
- 注册时间
- 2018-4-10
- 最后登录
- 2020-11-2
|
尾盘平仓在15分钟图上想用1分钟图上14:58的K线收盘价作为平仓价格
一分钟图上公式:
Params
Vars
NumericSeries s;
Begin
If(time==0.1458) s=c;
SetTBProfileString("mysection","s",text(s));
End
15分钟图上尾盘平仓公式:
getTBProfileString("mysection",s);
If((trueDate(-1) != InvalidInteger && trueDate(0) != trueDate(-1)) || (trueDate(-1)==InvalidInteger && trueDate(0)<CurrentDate))
{
Sell(1,Value("s"));
BuyToCover(1,Value("s"));
}
为何实现不了,平仓价格还是最后的日收盘价。 |
|