I always use a private call to an indicator just under public class like the following example
public class ExampleStrat: Strategy { private Stochastics stoch0;
else if (State == State.Configure) { stoch0 = Stochastics(periodD,periodK,smooth); } else if (State == State.DataLoaded) { stoch0 = Stochastics(periodD,periodK,smooth); AddChartIndicator(stoch0); }
But I have a custom indicator where I am doing the exact same thing, and it is throwing a compiling error
saying the indicator "is a 'method' but is used like a 'type'
Is there anything special that might cause this? Not sure why I have never had this issue with passing through any other default or custom indicators.
Comment