Guys, the scenario I have here is an account “Balance”, for example $1,000.00.
In the app, I need to show, throughout the day and in real time, how much this balance has varied, more or less.
This is because throughout the day the balance of that user will suffer credits and debits. I need to get the balance from the beginning of the day, then add or subtract the entries. The data I’m going to show is the percentage of profit or loss on the day’s initial balance, so that the user can analyze, together with his daily goal, whether it’s time to stop or continue operating.
My question is how do I get the frozen balance from the beginning of the day to do the calculations? Since with each release the balance will be changed and then I can’t deliver that number to the user.
The idea is to show the profit/loss percentage for the day. It is a football sports betting control app. And we know that the gambler starts each day with a target percentage to beat.
For example: “I stop betting when I manage to beat 5% or 10% of the amount I started my bankroll today.”
Got it, can you help me?