NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 05-15-2007, 03:15 PM   #1
theperm
Junior Member
 
Join Date: Aug 2005
Location: , ,
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default Using AtmStrategyChangeStopTarget before strategy is active

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?
theperm is offline  
Reply With Quote
Old 05-15-2007, 04:39 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Correct, will only work once live and the entry has been filled and the stop and targets have been submitted.
NinjaTrader_Ray is offline  
Reply With Quote
Old 05-16-2007, 03:32 AM   #3
theperm
Junior Member
 
Join Date: Aug 2005
Location: , ,
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default

It would be really powerful if we could modify beforehand like i want to. What are the chances of having that implemented?
theperm is offline  
Reply With Quote
Old 05-16-2007, 07:00 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

I will add this to our list for future consideration.
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-01-2012, 04:29 PM   #5
anachronist
Senior Member
 
Join Date: Jul 2008
Posts: 271
Thanks: 4
Thanked 7 times in 7 posts
Default

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
anachronist is offline  
Reply With Quote
Old 10-02-2012, 02:33 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

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.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 10-02-2012, 08:49 AM   #7
anachronist
Senior Member
 
Join Date: Jul 2008
Posts: 271
Thanks: 4
Thanked 7 times in 7 posts
Default

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().
anachronist is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
strategy/auto trade problem: stops/etc. initiate upon starting of strategy scriabinop23 Automated Trading 14 05-30-2007 12:29 PM
display active stop / limit orders while running a strategy on a chart Nathamus Strategy Development 1 03-13-2007 07:22 AM
One Active Strategy on Scaling in.. Nelson1980 Miscellaneous Support 4 06-13-2006 01:06 AM
How to change the active account? fliesch Installation and Licensing 5 06-08-2006 12:16 AM


All times are GMT -6. The time now is 02:05 PM.