I have a strategy which within its OnBarUpdate function calls an indicator. The function in the indicator calls this and I get an error.
Any ideas,
Cleo
Error:
Error on calling 'OnBarUpdate' method for strategy 'PivotInputTester/be07f09df7bf4629a696f604496067ba': Object reference not set to an instance of an object.
Code:
if (Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP.ContainsValue(0)){
// Prints the current pivot point value
double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
Print("The current Pivots' pivot value is " + value.ToString());
} else {
Print("Not Valid Pivot");
}
Comment