sr = new System.IO.StreamReader(filename);
using (StreamReader sr = new StreamReader(FilePath))
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\xxxx\Documents\NinjaTrader 8\'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.StreamReader..ctor(String path) at NinjaTrader.NinjaScript.Indicators.CustomLevelsDis play.OnBarUpdate() in C:\Users\xx\Documents\NinjaTrader 8\bin\Custom\Indicators\Test.cs:lin e 145
Also, when using the initial "new System.IO.StreamReader" command, it locks up my file (I can't edit the file) while the indicator is running, since the Dispose method is in the State.Terminated section, should I relocate that code?
Thanks
Comment