Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Move ATM Strategy stop order with indicator/price bars
Collapse
X
-
Move ATM Strategy stop order with indicator/price bars
If I have a strategy that is using an ATM strategy for order placement/management, can I add code to the strategy that will move the ATM stop order based on the movement of an indicator or follow a previous bars high/low? I realize that you can add an indicator to the DOM but that is very cumbersome, plus I'd like to have the stop follow the previous bars high/low in some instances. ThanksTags: None
-
I am trying to get this to work but I'm having trouble with the ordername, which in the example below is Stop1... I am using this to create my order...Originally posted by NinjaTrader_ChelseaB View Post
AtmStrategyCreate(OrderAction.Buy, OrderType.Market, 0, 0, TimeInForce.Day, orderId, AtmStrategy, atmStrategyId, (atmCallbackErrorCode, atmCallBackId) => {
AtmStrategyChangeStopTarget(0, SMA(10)[0], "Stop1", "AtmIdValue");
Comment
-
Hello mlarocco,
You will want to ensure the price you are selecting is a valid price first. If the stop is a sell stop, this must be 1 tick below the bid, if the stop is a buy stop it must be 1 tick above the ask.
You will need to supply the actual atmStrategyId used in AtmStrategyCreate(). The string "AtmIdValue" is not correct. The example in the help guide is showing this as a placeholder of where whatever string you used for the atm Id would be used here.
"Stop1" would be correct.Chelsea B.NinjaTrader Customer Service
Comment
-
I think I have it working correctly now.... Thanks!Originally posted by NinjaTrader_ChelseaB View PostHello mlarocco,
You will want to ensure the price you are selecting is a valid price first. If the stop is a sell stop, this must be 1 tick below the bid, if the stop is a buy stop it must be 1 tick above the ask.
You will need to supply the actual atmStrategyId used in AtmStrategyCreate(). The string "AtmIdValue" is not correct. The example in the help guide is showing this as a placeholder of where whatever string you used for the atm Id would be used here.
"Stop1" would be correct.
Comment
-
One other question, it there a way to call indicators from a dropdown? Something that you query the installed indicators and add themOriginally posted by NinjaTrader_ChelseaB View Post
Comment
-
Hello mlarocco,
The documented and supported way is to create an enum drop-down of pre-defined indicators (that have plots).
Below is a link to the help guide reference sample.
https://ninjatrader.com/support/help...ned_parame.htm
The unsupported way would be to use reflection which our Engineering Support staff is not able to assist with. But this thread will remain open for any community members that would like to provide guidance.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
71 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
143 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment