I have an indicator in which I have created some public Property Getters / Setters, see below;
public double RangeDifference
{
get { Update(); return _rangeDifference; }
set { _rangeDifference = value;}
}
public int ResetCrossAfterLowOrHigh
{
get { Update(); return _resetCrossAfterLowOrHigh; }
set { _resetCrossAfterLowOrHigh = value;}
}
In my code I assign values to these properties using code like;
RangeDifference = 20.15;
In my strategy I access these values and can see the values to use them. However, if I try to add the [0] suffix I get an error saying I cannot use type double. If I compare my indicator to something like the Bollinger Bands "Upper" I notice they are getters only and they are declared as Series<double>
Should my properties be created as Series<double> and be only getters?
and if I want to use my indicator "correctly" is this how it should work?
Regards
Comment