When I try assigning a public variable of my indicator, it says "Object reference not set to instance of an object". I have tried making the variables ninja script properties, making a wrapper and using get / set method around a private variable, and just declaring the class variables themselves as public but none seem to be working because of the object reference error. I am working with simple boolean value variables.
Indicator has code like:
public class PriceActionTrend : Indicator
{
public bool LookingForOneMinBos = true;
...
}
Strategy Code:
Declared in class:
private PriceActionTrend OverallTrend;
In State.Configure:
OverallTrend = PriceActionTrend(60, false, 20, 2, 10);
In OnBarUpdate:
OverallTrend.LookingForOneMinBos = false; // THIS does not work, get error.

- this now works in my strategy file.
Comment