Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Using a ATM in a Strategy
Collapse
X
-
Hello nedrob519,
Thank you for your post.
Unfortunately, this is not possible through the Strategy Wizard. You will need to unlock the code to add the ATM Strategy methods and functions.
You can find an example under Tools > Edit NinjaScript > Strategy > SampleAtmStrategy.
Information on the methods and functions can be found at the following link: http://www.ninjatrader.com/support/h...gy_methods.htm
Please let me know if I may be of further assistance.
-
if you disable chart trader on the first chart and open chart trader on a second chart the order will show on screen. Is it ok to manage the stop loss this way or will it mess up the strategy? I noticed that the stop losses would be taken and show up in executions page but still show fluctuating pnl on strategy page as if it were still there.
Comment
-
If you are using ATM Strategies, it is fine to manually modify the order once you're in position.
As long as your strategy is not explicitly resetting the stop price in code somewhere, the atm strategy which is created should allow you manually move the orders.MatthewNinjaTrader Product Management
Comment
-
I am using this code to initiate the ATM Strategy, however I've noticed that when the position is reversed the stop loss order is still there.
AtmStrategyCreate(OrderAction.Buy, OrderType.Market, 0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(), "AtmStrategyTemplate",
GetAtmStrategyUniqueId());
Comment
-
Hello Brucelevy,
You need to cancel and close out the other order.
ATM strategies are not tracked with Strategies, so once they are entered they are tracked by themselves. You would need to close the other working ATM for this.
http://www.ninjatrader.com/support/h...ategyclose.htmCal H.NinjaTrader Customer Service
Comment
-
Would it be added like so?
AtmStrategyCreate(OrderAction.Buy, OrderType.Market, 0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(), "AtmStrategyTemplate",
GetAtmStrategyUniqueId());
if (GetAtmStrategyUnrealizedProfitLoss("idValue") > 500)
AtmStrategyClose("idValue");
Comment
-
Hello brucelevy,
Thank you for your response.
You would assign a string as AtmStrategyId, then use that in AtmStrategyCreate() and AtmStrategyClose().
For example:
Take a look at the example under Tools > Edit NinjaScript > Strategy > SampleAtmStrategy, this will give you a better idea of how to assign the atmStrategyId and orderId.Code:atmStrategyId = GetAtmStrategyUniqueId(); orderId = GetAtmStrategyUniqueId(); AtmStrategyCreate(...)
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment