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
Strategy Analyzer: Total Net Profit
Collapse
X
-
Strategy Analyzer: Total Net Profit
Is there any way to change the value of the "Total Net Profit" that is displayed in the Strategy Analyzer ? That is, I'd like to apply different "expenses" to limit orders vs market orders (sort of like commissions that vary according to what kind of order is executed).Tags: None
-
-
Hello spottysallrite,
You would have to do the math to calculate that in your custom performance metric or use the TradesPerformance collection that the metric has access to in the merge stage.
The sample performance metric that comes with the platform is documented and shows how you can access the individual trade values to return a performance value and also how to access the full performance collection to do a final calculation to provide a result to the grid totals.
JesseNinjaTrader Customer Service
Comment
-
Right. When doing Optimizations, I often use the Max Downdown as part of my custom OptimizationFitness calc. So, for this metric to be accurate the Drawdown calc would have to include these variable "expenses" that I mentioned in my first post here. So, any suggestions as to how to include these "expenses" in these drawdown calcs so they can be used for ranking purposes in the Optimization?
Comment
-
Hello spottysallrite,
You would need to manually do the math in your performance metric based on the available data if all data points you require are available there. You can't change the calculations of the existing performance metrics so anything outside of standard metrics that your fitness requires would require that you do the math yourself.JesseNinjaTrader Customer Service
Comment
-
Well, seems like the best way (only way ?) to apply this custom "expense" is to each, individual trade of each scenario of an Optimization. Yes, that can be done in Excel using exported results from the Strategy Analyzer, but what is needed is for those calcs to be used while the Optimization is run (so as to rank those results).
Maybe what I'm asking for is a custom field in the "Trades" window that would include this kind of work (eg, variable expenses according to execution type), then include that in a custom performance metric calculation. Would this be possible now, or would that have to be done in a future version of NT, or is this just something that will not be done at all by NT?
Comment
-
Hello spottysallrite,
From an optimizer fitness you would need to use the SystemPerformance collection to go over the trades and accumulate your own value so you can do the math you need before setting Value. You have access to all of the trade information in the strategy.SystemPerformance.AllTrades collection.JesseNinjaTrader Customer Service
Comment
-
Hello Tim-c,
You can find a sample of using the cumulative profit in the strategy builder in the following forum post:
Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatraderJesseNinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by poplagelu, Today, 05:00 AM
|
0 responses
3 views
0 likes
|
Last Post
by poplagelu
Today, 05:00 AM
|
||
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,407 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
98 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
8 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
160 views
0 likes
|
Last Post Yesterday, 10:23 PM |
Comment