帮忙写下 5分钟K线叠加分时均价线的公式,谢谢!
分时图的话 我建议用一分钟周期代替
请问怎么把分时均价线显示在一分钟K线图上?
Vars
Series<Numeric> baramount;
Series<Numeric> barvol;
series<numeric> dayavg;
Events
onBar(ArrayRef<Integer> indexs)
{
if(truedate(0)!=truedate(1))
{
baramount=close*Vol;
barvol=vol;
}else
{
baramount = baramount+close*vol;
barvol = barvol+vol;
}
dayavg = baramount / barvol;
Plotnumeric("dayavg",dayavg);
}