Hi.
It isn't something wrong with the code.
Changing the code to this ( with a zero instead )...
Code: Select all
if ( Bars.FullSymbolData.Current > 0 )
{
// CODE
}
...makes it work. I can still have only 34 plots back by reseting, but it's a heavy indicator, so it takes some time to load.
I'm using it to decide when the calculation of the indicator starts, then I'm reseting the plots to something even less.
Steps to reproduce the issue is to reload the chart ("Ctrl+R"), changing an input in the indicator, or jump back for playback.
Something else is that I'm sometimes using this concept like this:
Code: Select all
int StartCalcBarsBack = 144;
if ( Bars.FullSymbolData.Current > Bars.FullSymbolData.Count - ( StartCalcBarsBack + 34 ) )
{
// CODE
if ( Bars.FullSymbolData.Current > Bars.FullSymbolData.Count - StartCalcBarsBack )
{
// CODE
}
}
I think I'm going to stop using this solution, until it is solved.
Sometimes the indicator doesn't load anything at all, but it works the 1st time the indicator loads. This is strange.
Best regards,
Johannes Hillestad Baumann