Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Analyzer: Optimization
Collapse
X
-
Strategy Analyzer: Optimization
Would it be possible to optimize on the ratio of "Total net profit" divided by "Max drawdown" (ie, to maximize this difference)? Yes, you can optimize on either one, but often the optimization of the drawdown (ie, minimizing it) is to make no trades at all, which is not helpful.Tags: None
-
Hello spottysallrite,
Thank you for your post.
Yes, you could create your own Optimization fitness. The following would divide the total net profit in currency by the Max drawdown:
Value = (strategy.SystemPerformance.AllTrades.TradesPerfor mance.NetProfit / strategy.SystemPerformance.AllTrades.TradesPerform ance.Currency.Drawdown);
Please let us know if we may be of further assistance to you.
-
I'm not following. Where does that code go? Someplace in my script? If so, how does the Strategy Analyzer access it so it can run optimizations on it?
Comment
-
Hello spottysallrite,
Thank you for your reply.
You would need to create an Optimization Fitness script. Once you've created that, you just need to put that line in the OnCalculatePerformanceValue() method and compile - it will then be selectable in the "Optimize On" field in the Strategy Analyzer to use with whatever strategy you like. You can take a look at any of the optimization fitnesses that come built into the platform to see how they are structured - they're pretty simple.
Please let us know if we may be of further assistance to you.
Comment
-
Nice ! This seems to be working just as expected / wanted. Any idea when this feature was first offered?
Comment
-
Would it be possible to see these results in a field in the "Results" section ? And sort the results according to this parameter?
Comment
-
Is it possible to display more than one performance metric in the "Results" section ? eg, I'm interested in seeing (and perhaps optimizing on) "Max drawdown" / "Total # of trades".
Comment
-
Hello spottysallrite,
Thank you for your reply.
You could make a separate optimization fitness script to calculate on that, you'd basically just have to reverse the logic I posted above, but you can only use one optimization fitness per optimization, it wouldn't be possible to display 2 of them.
Please let us know if we may be of further assistance to you.
Comment
-
Ok, I'd like to make a feature request for this (ie, displaying more than one custom parameter in the "Results" section). And, would it be possible to allow the user to give them names ("Performance" is ambiguous) ?
Comment
-
Hello spottysallrite,
Thank you for your suggestion.
I have created a feature request on your behalf for this functionality. This request is being tracked under the number SFT-5520.
As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.
Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
Please let us know if we may be of further assistance to you.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
66 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
141 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment