im trying to read from a File that is called ZRTK.csv.
If i acces it with path = NinjaTrader.Core.Globals.UserDataDir + "APData" + "TK" + "ZR"+ "TK"+".csv";
it works properly.
Now i want to automaticly switch to another file if i change the Master instrument.
I tried it with
path = NinjaTrader.Core.Globals.UserDataDir + "APData" + "TK" +(string)Instrument.MasterInstrument.Name + "TK.csv";
or
path = NinjaTrader.Core.Globals.UserDataDir + "APData" + "TK" +Instrument.MasterInstrument.Name + "TK.csv";
but that crashes my indicator.
Masterinstrument was ZR 01-20.
Can you tell me what i did wrong? And how it is done wright?
Thanks a lot
Branpo
Comment