Let me join the discussion too. I am kaseipds's partner. Kaseipds is a generator of trading ideas, and I am a coder who translates the idea into the script. As a coder I have some questions. Let's imagine the following trading environment.
1. The user has an opened browser with some tabs containing trading consoles of web ninjatrader.
2. The user has launched desktop instance of NT8.
3. The user trades in the web.
4. Once the user places entry/exit order he can also see the trade in the desktop app somewhere in trade performance UI. So, the trades are synchronized.
5. We are going to create some addon in the desktop app that monitors those trades and calculates total PnL. If total realized PnL reaches some threshold value, the addon makes the following steps:
a) flattens all active positions
b) doesn't allow any trading operation both in the web and desktop consoles until the end of the session.
I don't know yet how to manage point "b"... There may be some properties and/or methods of the class Account to get desired functionality...
Is the algorithm described above implementable?

Comment