Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ATM Targets
Collapse
X
-
Target do not move - Stops do
I tested the code as follows:
if (atmStrategyId.Length > 0
&& GetAtmStrategyMarketPosition(atmStrategyId) == MarketPosition.Short)
{
AtmStrategyChangeStopTarget(0, (target1), "TARGET1", atmStrategyId);
AtmStrategyChangeStopTarget(0, (target2), "TARGET2", atmStrategyId);
AtmStrategyChangeStopTarget(0, (stopPrice), "STOP1", atmStrategyId);
AtmStrategyChangeStopTarget(0, (stopPrice), "STOP2", atmStrategyId);
}
The Stops move as expected but the Targets remain at the preset value of the ATM.
Any suggestions?
Thanks
Comment
-
Print to output window
I tested the code as follows:
if (atmStrategyId.Length > 0
&& GetAtmStrategyMarketPosition(atmStrategyId) == MarketPosition.Short)
{
AtmStrategyChangeStopTarget(0, (target1), "TARGET1", atmStrategyId);
AtmStrategyChangeStopTarget(0, (target2), "TARGET2", atmStrategyId);
Print("The current ATM Target 1 position is: " + target1);
Print("The current ATM Target 2 position is: " + target2);
AtmStrategyChangeStopTarget(0, (stopPrice), "STOP1", atmStrategyId);
AtmStrategyChangeStopTarget(0, (stopPrice), "STOP2", atmStrategyId);
}
Once the order fires here is the output
The current ATM Target 1 position is: 8
The current ATM Target 2 position is: 25
The ATM is set to 8 and 16 and the targets remained at 8 and 16
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment