Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
How to get CumProfit of the day, not the whole chart?
Hi I am trying to set a daily profit and loss limit to my strategy. After the limit is hit, the strategy stops trading for the day.
Here I found this function to return cumulative realized profit.
Performance.AllTrades.TradesPerformance.Points.Cum Profit
But this function returns cumulated profit of all days on the chart, not daily profit...
I know I could work around it by setting the chart's data series to one day only. But I would really to have daily profit limit, so that I can eye on my strategy on a multiple-day chart.
Thank you!
Can you help answer these questions from other members on NexusFi?
thanks. but this method does not work when I want to back test my strategy... I hope the strategy to stop every day on my chart, and start again the next day.
Ok you did not mention in your op it was for backtesting concern, if the data range is consistent what I do in this case is import the data into an excel file and filter the information separately (nt has some limits and sometimes you have to overcome manually).
Been years, so I am rusty. But I have definitely done this for both real time and backtesting.
There is another method you can call that is not RealtimeTrades. Can't remember what it is called, sorry.
And then on each new session, you need to simply check the prior value, and then 'reset' it by putting forward a new value that starts at zero each day.