Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Identifying ATM orders
Collapse
X
-
Hello ellington,
Thanks for your notes.
Could you please provide us with more detail about exactly what you want to accomplish so we may accurately assist?
Are you referring to ATM Stop/Targets submitted from a NinjaScript strategy using Atm Strategy Methods?
Or, are you referring to manually submitted orders that use ATM Strategy Templates?
We look forward to assisting further.Brandon H.NinjaTrader Customer Service
-
Sure. I'm working on a trade logging database and using updates to orders and executions to log state changes. For any given open position, I'd like to be able to understand which Stop/Targets are associated with the initial opening order, irrespective of whether the Stop/Target was submitted using an ATM Strategy Template or a NinjaScript strategy.
Comment
-
Hello ellington,
Thanks for your notes.
Are you referring to manually submitted orders or ATM strategies submitted from a NinjaScript strategy.
If the stop/target was submitted from a script using Atm Strategy Methods, only Atm Strategy Methods could be used to get information about those orders.
GetAtmStrategyStopTargetOrderStatus() would be used to get information about the stop/target submitted from Atm Strategy Methods.
From the 'Using Atm Strategies' help guide:
"Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL - the NinjaScript strategy hands off the execution aspects to the ATM, thus no monitoring via the regular NinjaScript strategy methods will take place (also applies to strategy performance tracking)"
Using Atm Strategies: https://ninjatrader.com/support/help...strategies.htm
If you want to get the orders on a specified account you could loop through the Account.Orders collection.
Account.Orders: https://ninjatrader.com/support/help...rs_account.htm
You could subscribe to Account OrderUpdate events to get information about orders when changes occur.
Account.OrderUpdate: https://ninjatrader.com/support/help...rderupdate.htmBrandon H.NinjaTrader Customer Service
Comment
-
Hello ellington,
Thanks for your notes.
You could view this Ecosystem User App Share script called "AtmStrategyIdentifier" to get an idea of how to get chart trader account orders and save ATM orders, IDs, and names to a dictionary in the script and sort orders into arrays of stop orders and target orders.
AtmStrategyIdentifier: https://ninjatraderecosystem.com/use...egyidentifier/
For information about working with dictionaries you could do a Google search for something like 'Working with Dictionary C#'. Note that this would fall under C# education which we do not provide in our support at NinjaTrader.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.Brandon H.NinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment