My goal is to read and write data to the same text file from many NT8 strategies running in many concurrent optimizations and many strategies running concurrently on many charts in real-time.
I realize that inside of a single instance of NT8, both strategy optimizations as well as real-time strategy execution on charts run on multiple threads, so it is important to make my code that writes to the text file thread-safe.
If a single instance of NT8 runs under a single process (with many threads) and never spawns other processes, I could just use the easy to use and highly performant ReaderWriterLockSlim class ( https://docs.microsoft.com/en-us/dot...ew=netcore-3.1 ) but if a single instance of NT8 spawns other processes I would have to use the much less performant Mutex class ( https://docs.microsoft.com/en-us/dot...ew=netcore-3.1 ) to ensure that the text file is read from and written to in not only a thread-safe manner but also a process-safe manner.
So my question is:
NT8 is definitely multi-threaded, but is it ever multi-process? I.e. could multiple strategies running concurrently in multiple Strategy Analyzer optimizations and running on multiple charts in real-time ever be running in any process other than the one under which NinjaTrader.exe executes?
Thanks in advance!
EquityTrader
Comment