How do I get Trade Performance to count these as one trade? It shows hundreds of trades but in the chart example it's just one trade with 22 micros being used.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Each order shows as a trade in Trade Performance
Collapse
X
-
Each order shows as a trade in Trade Performance
How do I get Trade Performance to count these as one trade? It shows hundreds of trades but in the chart example it's just one trade with 22 micros being used.
Tags: None
-
Hello Lance El Camino,
Thank you for your post.
I suspect that the order had many partial fills, which means there could be separate entry prices/times and exit prices/times to be tracked in reporting. The Trade Performance report should be considered secondary to your actual brokerage statement; NinjaTrader does not have a concept of 'trades' in its reporting and simply pairs together executions. Each partial fill is a separate execution, and that is why they are counted as separate 'trades' in the reporting. This is a limitation of the Trade Performance reporting and how it is designed to work by pairing executions, so there is no way to get the report to show them all as one trade. The same would show up in strategy performance reporting from a chart or the Strategies tab of the Control Center.
Please let us know if we may be of further assistance.
-
So I'm trying to limit the number of trades I take per session so does this also apply to SystemPerformance.AllTrades.count meaning the TradeCollection object adds one for each order rather than a trade?
Comment
-
Thanks. Unless I'm wrong, there's no Position object or array that stores the past position performance. I'm needing to limit to a maximum of 2 positions per session, 1 per session if it's a win, and up to 2 if the first is a loss. I'm going to try using a variable to track the number of trades taken per session (int TradeTaken) and just reset it to zero at the beginning of each new session as well as another variable to get the account balance at the beginning of the session (double BeginningBalance):
Declare variables:
Count number of positions (trades) taken when execution occurs:Code:private int TradeTaken; private double Beginning Balance; private double CurrentBalance; private double SessionPnL;
Reset at the beginning of next session and get the current account balance:Code:if (BarsSinceEntryExecution(0, "LongShort", 0) == 0) TradeTaken++;
Then to see winners versus losers I can use a variable CurrentBalance to track the account balance:Code:if (Bars.IsFirstBarOfSession) TradeTaken = 0; BeginningBalance = a.Get(AccountItem.CashValue, Currency.UsDollar);
Now add to entrance conditions. If the first trade is a winner, we are done. If the first trade loses, we get one more try:Code:CurrentBalance = a.Get(AccountItem.CashValue, Currency.UsDollar); SessionPnL = CurrentBalance - BeginningBalance;
Anything I might be missing here?Code:if (TradeTaken == 0 || TradeTaken == 1 && SessionPnL < 0)
Comment
-
I forgot to add the account object:
Code:Account a = Account.All.First(t => t.Name == "SimorLiveorPlayback");
Comment
-
Hello Lance El Camino,
Thank you for your reply.
Keeping track of the number of trades and the beginning balance via variables (as well as resetting the values at the beginning of a session) should work to suit your needs of setting conditions that limit to 2 entry submissions max. I suggest testing this on the Playback connection to ensure it is working as expected.
Please let us know if we may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
41 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
64 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment