View Full Version : Using AtmStrategyChangeStopTarget before strategy is active
theperm
05-15-2007, 03:15 PM
I want to create an ATM strategy and modify its STOP1 and TARGET1 imediately so all i need to use is a single template and my code can customise the stop and targets.
When i use AtmStrategyChangeStopTarget right after AtmStrategyCreate (and before entry has been filled) i do not get the desired effect when the entry is filled as it uses the params from origianl template. Should i assume these methods only work when an ATM is live? Or is this an oversight?
NinjaTrader_Ray
05-15-2007, 04:39 PM
Correct, will only work once live and the entry has been filled and the stop and targets have been submitted.
theperm
05-16-2007, 03:32 AM
It would be really powerful if we could modify beforehand like i want to. What are the chances of having that implemented?
NinjaTrader_Ray
05-16-2007, 07:00 AM
I will add this to our list for future consideration.
anachronist
10-01-2012, 04:29 PM
5 years later... just wondering what became of this. Does AtmStrategyChangeStopTarget() now change the stop or target in the ATM strategy before the entry order is filled?
This should be clarified in the documentation.
-Alex
NinjaTrader_Bertrand
10-02-2012, 02:33 AM
Hi Alex, the ATM would only be created once the entry order reports filled - so the exit brackets would be sent, then you could use AtmStrategyChangeStopTarget() on those.
anachronist
10-02-2012, 08:49 AM
OK. I guess this is still under future consideration then.
Having written my own framework to simulate ATM strategies in backtest, it was a simple thing to have AtmStrategyChangeStopTarget() adjust the stop and target of an already-created ATM strategy before the entry order is filled. I had assumed this was the case with "live" ATM strategies, but if not, then the documentation should clarify this point (and I'll have to remove that feature from my framework).
There are times when the stop and target would be determined dynamically by price action (say, the target is the high of the previous bar and the stop is the low of the last 5 bars), in which case the fixed stop and target of the ATM strategy is impractical. It is also impractical to have to track the entry fill just for the purpose of adjusting the exit bracket, instead of setting the exit bracket immediately after calling AtmStrategyCreate().