Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Managing multiple ATMStrategies
Collapse
X
-
Managing multiple ATMStrategies
Hi, have worked out how to programmatically create ATMStrategies ok and they work, I am able to create multiple discrete ATMstrategies in a ninjascritp strategy and I now need to have a way to manage those ATMstrategies. I believe i need to create a dictionary or a List to store the unique IDs and i know i can use GetATMStrateyEntryOrderStatus to see which orders have been filled. But how can i tell which Strategies are actually open positions or are completed ATMstrategies and the position closed by a corresponding Stop or Limit? Can you please set me on the right path to achieve this? If i need to use OnOrderUpdate or OnExecution, how do I reference an ATMStrategy Order?Tags: None
-
Hello, thanks for writing in. You will need to save each OrderID and ATMStrategyId that you generate from GetAtmStrategyUniqueId(); In the SampleATMStategy script you will see this method is used two times, once to generate the OrderID variable and once to generate the ATMStrategyId variable so you would need to save both of these to associate them with one order with one ATM attached to that order. You can then use these ID variables in any of the ATM strategy status methods e.g.
GetAtmStrategyEntryOrderStatus(string orderId)
GetAtmStrategyMarketPosition(string atmStrategyId)
To keep track of the order that is filled you will need C# logic like simple boolean flags and use these in conjunction with the ATM status methods that will keep track of the order of events. E.g. step 1 is submitting the entry order, checking its state, and monitoring the position after it has reached the Filled state.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
52 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment