各位大佬好,我编写了一个计算分时均价线的指标,经测试,在真实合约上非常准确,与历史分时图的价格包括Q_avgprice都一致,但是把同样的指标挂载到指数上,就不准确了,偏差时大时小,不同品种的偏差幅度也不一样。请教应该如何解决,非常感谢!
Vars
//此处添加变量
Series<Numeric> baramount;
Series<Numeric> barvol;
series<numeric> dayavg;
Events
OnBar(ArrayRef<Integer> indexs)
{
if(truedate(0)!=truedate(1))
{
baramount=turnover;
barvol=vol;
}else
{
baramount = baramount+turnover;
barvol = barvol+vol;
}
dayavg = baramount / barvol/(ContractUnit()*BigPointValue());
// 收盘序列变量重置
if(Time==0.1459)
{
up_avg_count=0;
down_avg_count=0;
has_closed=False;
}
}
什么指数?
888还是000?
000确实不太对
挂载的是000指数,还真的存在这个问题啊,那有什么解决方案吗?是想在指数上做主力合约的,这么一搞就不知道怎么整了
转给研发了,在等回复
请问有解决方法了吗
没有回复