I am trying do develop some custom enhancement for my Ninjatrader. What I want to achieve is, I want to plan a bracketed order in advance, meaning that I want to place a Buy / Sell LMT for example, but that entry order gets a stop and take profit automatically attached after being filled. I know about ATM Strategies, with their fixed difference to the entry. The problem is, that I don't need a fixed difference. I also do not want to always use a custom ATM manually, because I find this tedious.
That is why I want to create sth., where I can click for the entry, stop and take profit on my chart, for example 1st click is entry, 2nd click the stop and the 3rd is the TP. I already get the clicked prices correctly, but now I wonder what approach I can take for the order placement / submits. I want the stop and TP as OCO (of course), but they shall only get submitted after the entry order got filled. I used the TWS from IB for some time, there this was easily achieved with a bracket order and so called "Keys": 1.0 was the Entry, 1.1 and 1.2 the stop and TP, but they got only submitted after the filled entry and everything was submitted in advance and monitored on their servers. I would really appreciate sth. like this, since it is a nightmare for me if I would have to monitor the fill on my computer, because if I submit an order that way and my computer crashes, I would have an "unprotected" order in the market with no stop or TP getting submitted after its fill...
I also thought about sth. like creating a custom ATM Strategy based on the clicks every time, but I am afraid generating a custom ATM stratety in a script is currently not possible?
So my "real" questions:
1) Do I have to monitor the entry to get filled by myself or is there a function I can use for that, preferrably server-sided?
2) What is the best approach do model this regarding orders? I got a littble bit confused, since I can use Account.Orders or a "managed" or "unmanaged" approach. I already read the Help-Pages, but that did not really help with my problem here
3) Is it possible to generate a custom ATM Strategy in a script
4) Is it better to use an Add On, Indicator or Strategy here? I got a little bit confused, since they seem to differ on what resources the script gains access to...
I hope my problem got clear, otherwise please ask!
Best regards

Comment