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
Access Yearly Profit
Collapse
X
-
Hello starcd,
From the strategies trade performance there is only the profit per month property: https://ninjatrader.com/support/help...itpermonth.htm
This would generally be something you would need to calculate similar to finding the daily net profit. We have a sample that demonstrates accumulating the cumulative profit and then resetting it daily, that same type of logic could be used to reset monthly or annually if you wanted to calculate those values.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Within the Logic. My strategy is day by day, with trades that can be up to a year long and run past the year limit. I want to calculate the tax due at the end of the year. I currently do this via a Time[0].Year query and calculations using the SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit.it.
Comment
-
Hello starcd,
Thanks for that.
In the performance views you can sort by yearly/monthly however in code you would have to do as you are and use the performance collections. For a longer timeframe like a month or year that would take some logic similar to the accumulating a value daily using the session information but instead on the monthly or yearly scales. The Time object could be used to know when months or years have elapsed and some additional logic surrounding that would be needed.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by elirion, Today, 01:36 AM
|
0 responses
3 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:30 AM | ||
Started by samish18, Yesterday, 08:31 AM
|
2 responses
9 views
0 likes
|
Last Post
by elirion
Today, 01:28 AM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
16 responses
389 views
0 likes
|
Last Post
by z.franck
Today, 01:04 AM
|
||
Started by rtwave, 04-12-2024, 09:30 AM
|
4 responses
34 views
0 likes
|
Last Post
by rtwave
Today, 12:50 AM
|
Comment