There is a minor issue when the stock default VWMA indicator is used with bars that might have zero volume. For instance, renko and small range bars. This is represented with the blue plot in the examples. This occurs when several bars have zero volume and the formula fails in this instance to give a value, per the 2 examples below.
And with autoscale off
The blue plot is the stock VWMA indicator.
This effect can be fixed with the following simple code change
line 78
vol = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[i]) : Volume[i];
vol = Math.Max(1,Instrument.MasterInstrument.InstrumentT ype == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[i]) : Volume[i]);
Ensuring that the multiplication factor is always at least 1.
resulting in this for the same period
I leave the code and info here for others who might wish to fix the indie themselves in their install.
All the best,
Paul
Comment