![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | ||
|
Junior Member
Join Date: Jun 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
But if i want to put another priority condition > to my stop loss generated on the Dom to close my strategy, do i have to put : Quote:
thanks |
||
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
That will indeed close the active ATM strategy, but you need to use proper AtmStrategyId in that parameter.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2009
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Josh,
But how can i get previous AtmStrategyId from previous "AtmStrategyCreate" and put in AtmStrategyClose("HERE");? Thanks for your help ! |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
When you call the ...Create() method, you pass in an id value thus you would need to hold onto this value in your script. Create a variable outside of OnBarUpdate() in the "variables" section. Check out the SampleAtmStrategy, it does exactly this.
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Going from a Stop Loss to a Trailing Stop within a strategy | Sidhartha | Strategy Development | 28 | 03-24-2009 03:11 PM |
| Strategy stop loss | junkone | Strategy Development | 6 | 12-11-2008 10:32 AM |
| Atm strategy/ stop priority | nico_p | Strategy Development | 5 | 04-18-2008 12:56 AM |
| Sample ATM strategy resets on position close | tecmisc1 | Strategy Development | 1 | 04-10-2008 09:08 AM |
| ATM strat with stop loss and target order | Angel | ATM Strategies (Discretionary Trading) | 5 | 11-08-2007 09:44 AM |