All indicators in NinjaTrader will not plot the first 20-bar data. There is no exception whatsoever even though what the indicator might do is just plotting the input data as is. The VOL is one such indicator which plots the volume data without any sophisticated calculations. It is quite off-putting for a newbie like me when the basic VOL indicator "does not" work the way I've been accustomed to.
The "fix" is easy and it only requires one additional line in the VOL indicator source file [1].
protected override void Initialize()
{
BarsRequired = 0;
Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "Volume"));
Add(new Line(Color.DarkGray, 0, "Zero line"));
}
Even though the "fix" is a one-liner change, it has not been incorporated into the latest NinjaTrader release, i.e. v.7.0.1000.22. Hence, one will have to manually update and re-compile the indicator. Since one cannot save changes made to system indicators from within NinjaTrader, I would suggest one to edit and save the indicator using any text editors. Indicator source files are located in C:\Users\{username}\Documents\NinjaTrader 7\bin\Custom\Indicator.
---
---
- Reference: NinjaTrader Support Forum.
No comments:
Post a Comment