This is my code, but the volume reset on each bar update. I need accumulate and works en any type of chart.
private double ib_volume=0;
protected override void Initialize()
{
CalculateOnBarClose = true;
Overlay = true;
}
protected override void OnBarUpdate() {
if (Bars.FirstBarOfSession)
{
ib_volume = 0;
}
if (ToTime(Time[0]) >= 90000&& ToTime(Time[0]) < 10000) {
ib_volume += Volume[0];
}
Font f = new Font("Courier New", 9, FontStyle.Regular);
DrawTextFixed("tag22", "IB Volume: " + ib_volume, TextPosition.TopLeft, Color.Lime, f, Color.Transparent, Color.Black, 3);
}

Comment