Do I need to declare my own instance of the indicator in my strategy?
Can I simply reference the 3rd party indicator (which is on the chart), to obtain values from it to determine actions?
I get the following error when compiling my strategy in NT8:
Cannot implicitly convert type 'NinjaTrader.NinjaScript.Indicators.ncatVolumeSpre adScalper' to 'NinjaTrader.NinjaScript.Indicators.Indicator'
Portions of the code:
---------------------
#region Variables
Indicator myIndicator;
#endregion
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
} else if (State == State.Configure)
{
myIndicator = ncatVolumeSpreadScalper("Enabled", "Enabled", "Enabled", "Enabled", 5, 20, 70, 25, 70, 200, 150, "19892", "Minutes", 5, false, 5);
}
}
protected override void OnBarUpdate()
{
double ActiveHigh = (double)myIndicator.ActiveHigh[0];
double LineBreakUp = (int)myIndicator.LinebreakUp[0];
double LineBreakDown = (int)myIndicator.LinebreakDown[0];
}
Comment