What I am looking for code snippets which you can appropriately cut and paste or a custom generated class (eg: ATMType Class) which can then be referred to in the CustomStrategy. These strategies can then be backtested on historical data.
From what I understand, to scale out, you need to scale in NT6.5. To get the single unit granularity, you would have to create "N" EnterLong Scale In calls, and then manage each separately. This is really cumbersome and ATM is almost a must have.
In NT7 you can use low level orders (without the Internal Order Management hurdles), but even there being able to plug in a class which will use the ATM rules from a predefined template will be great.
Further you could then dynamically adjust price levels instead of the fixed levels in the ATM case.
One Possible Setup Could Be:
A. Export ATM Template
(1) Export ATM Template to a Class File. => CustomATMClass
This class will expose methods to set values for different parameters which are set graphically in the ATM template. The default values of the parameters will be equal to what is setup in the graphical template.
It will contain other instances of other classes (e.g. Target[0], Target[1]of the type CustomATMTarget) which will expose SetQTY, SetStopLoss etc. mirroring the graphical ATM entry.
It will also contain a CustomStopStrategy class with its own fields (like AutoBreakEven, MultiStepAutoTrail etc.) So Target[0].StopStrategy.AutoBreakEven.SetProfitTrigger
or Target[1].StopStrategy.Trail[1].SetProfitTrigger would be supported methods.
B. In Strategy
(0) In Initialize() myAMT = new CustomATMClass();
(1) EntryOrderHandle = SubmitOrder()
(2) myAMT.SetEntryOrder(EntryOrderHandle); // Will monitor and enter orders as appropariate.
-This is going to be very similar to the current AMT call but with the added bonus of dynamically adjusting the target orders.
Future Enhancements:
-It could be further be enhanced to take back control from AMT if the strategy logic needs to do so. For Each Target, the strategy can look at the current status of the open orders (Profit and Stop) and proceed accordingly.
myATM.Suspend(); // Will stop ATM and take back control; no New Orders Entered
myATM.Target[0].ProfitOrder, myATM.Target[0].StopOrder will return the current state of the ATM system. The strategy can decide to update these orders, or cancel them and submit new orders.
-The integration with the current calls supported by strategy OnOrderUpdate etc. should be there, with special tokens added to specify the order being an ATM generated order. These orders can not be modified outside the ATM, unless the ATM is suspended.
Comment