As NinjaTrader is a multi-threaded software, I wonder:
- Could the same event listener been executed on different threads? For example, at the time the thread1 is executing `OnBarUpdate()`, is it possible for thread2 also trying to execute `OnBarUpdate()`? (It could be horrible if “yes”, but I still want to confirm)
- If the answer is “no” for the above question, which event listeners are on the same threads? This is important since this tells me if sharing a object between two event listeners are safe. For example, are “OnBarUpdate()” and “OnOrderUpdate()” on the same thread? If yes, then we can safely get the order object from “OnOrderUpdate()” and assign it to a global variable, and “OnBarUpdate()” can make trading decisions (such as avoid double orders) based on the state of this order object.
