Looking at the ChartToCsv code (https://ninjatraderecosystem.com/use...oad/charttocsv/) I wanted to simply display the value of an indicator which cannot be accessed by code but which is displayed both in the data box and in the save file.
This is the Vpoc line of this indicator https://ninjatraderecosystem.com/use...estionboxlite/
But the result is always print 0, whereas if I save with ChartToCsv, the values are correct.
So I'd like to understand, not especially the action with the CongestionBoxLite,(for example) but why some indicators display always 0 while others display their correct value( SMA for example), even though when exported to a save file, the results are correct.
Thanks for your help.
My code :
foreach (IndicatorBase indicator in ChartControl.Indicators) // loop through indicators on chart { for (int seriesCount = 0; seriesCount < indicator.Values.Length ; seriesCount++) // process each plot of the indicator { Plot plot = indicator.Plots[seriesCount]; // get a plot from the indictor double val = indicator.Values[seriesCount].GetValueAt(0); // now get a specific bar value Print(plot.Name+"\t\t"+val.ToString()); } }
Comment