in test performance report how can i understand maximun loss in which trade happened and of course in which trade maximum profit happened?
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
performance report analyse
Collapse
X
-
Hello f.saeidi,
You can use a C# foreach or for loop to loop over each trade.
foreach (Trade thisTrade in SystemPerformance.AllTrades)
{
Print(thisTrade.ProfitCurrency);
}
If you save this value to a variable you can compare to see which is bigger and save the highest value to the variable. At the end of the loop, the highest ProfitCurrency is saved to the variable.
The SystemPerformance collection updates when a position closes in OnPositionUpdate().
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Vitamite, Yesterday, 12:48 PM
|
3 responses
17 views
0 likes
|
Last Post Today, 02:28 PM | ||
Started by aligator, Today, 02:17 PM
|
0 responses
15 views
0 likes
|
Last Post
by aligator
Today, 02:17 PM
|
||
Started by lorem, 04-25-2024, 09:18 AM
|
22 responses
96 views
0 likes
|
Last Post
by lorem
Today, 02:08 PM
|
||
Started by sofortune, Today, 10:05 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 01:37 PM | ||
Started by ETFVoyageur, 05-07-2024, 07:05 PM
|
23 responses
185 views
0 likes
|
Last Post
by ETFVoyageur
Today, 01:35 PM
|
Comment