Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
List executed trades by strategy
Collapse
X
-
List executed trades by strategy
Hello Devs, I have a strategy that sends market orders through the AtmStrategyCreate method. Everything works fine, but now I want to obtain all the trades executed by the current strategy on the current day first, in order to add some rules based on whether the strategy has already sent trades on the current day or not. Any ideas on how to obtain the strategy executed trades?Tags: None
-
Hello Quanto,
When submitting orders through AtmStrategyCreate() these are submitted through the core the same as manually submitted orders, which will not update order update methods (like OnOrderUpdate()/OnExecutionUpdate()) and will not populate the SystemPerformance collection.
This means to see any order updates you would need to use the Addon approach of accessing orders and executions through an Account object, and there wouldn't be any native way of determining where the order originated from as the orders are not associated with the NinjaScript Strategy.
Further, when using AtmStrategyCreate() you will not have the ability to set the signal name of the order to try and identify it this way.
One idea might be to use a particular string as part of each entry orderId, and then using string.Contains() or string.Substring() to see if that string is part of the orderId to identify it as being from this strategy.
Chelsea B.NinjaTrader Customer Service
-
Thank you, Chelsea, for your response. The solution you suggest is functional, but I only receive information about trades after one has been executed, not before. My intention is to be able to determine from the moment the strategy is activated whether any trades have been made that day. If so, I would like to review the details of the operation(s) carried out in order to make decisions within the algorithm. Once again, thank you very much for your help.
Comment
-
Hello Quanto,
In State.DataLoaded you can loop through the <Account>.Orders collection or <Account>.Executions collection to see if there have been any orders submitted or any orders filled.
The moment the strategy is enabled this would detect if any orders have been filled on the account.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment