I am trying to make an INDICATOR to work only in the instrument that I set it for. However, it gives the error: "close strategy does not exist in the current context"
I am usign this code:
if (Instrument.MasterInstrument.Name != "MNQ")
{
Draw.TextFixed(this, "BR", "ALGORITHM NOT LICENSED FOR THIS INSTRUMENT", TextPosition.BottomRight);
PlaySound(NinjaTrader.Core.Globals.InstallDir + @"\sounds\Announcement.wav");
CloseStrategy("Not Licensed " + Time[0].ToString());
return;
}

Comment