I am very proficient in c# and spent quite a bit of time to familiarize myself with the NinjaScript model and already coded several hellow-world addons.
I need a reference at runtime (either OnExecutionUpdate or OnOrderUpdate event) to the instance of the active ATM associated with this execution/order when entered discretionary by the user in the GUI, say the SuperDOM. I cannot tell what that unique instance identifier is. None of these classes help me — Execution, Order, ExecutionEventArgs, OrderEventArgs.
In the GUI, the ATM selector combobox shows all the active ATM instances and even auto-names them with a 1-based index. Even if there are multiple active ATMs the GUI is aware which orders belong to which active ATM. So this logic clearly exists.
In the @SampleAtmStrtegy the “AtmStrategyTemplate” is hardwired in the code and not even passed as a parameter. The code calls StrategyBase.GetAtmStrategyUniqueId() which is assigned to both an Order and a Strategy. So the code initiates the trade entry and and then generates and coordinates the ids for the the entire bundle of orders and their status. Whereas, I want the reference to the active ATM when the entry was initiated not by my code but by the user in the GUI. So technically this is more like an indicator. For now I just print out the output but later I will plot on the chart and/or populate a display control.
Thanks a lot
Comment