Hi there! I'm not a very experienced programmer, but I'm amazed with retool and learning a lot through it and this community. Trying to build a trading journal.
I can make a get RESTQuery request and retrieve data an plot it as chart. I made a dataset from the profit (or loss) generated on each trade.
Now I wanted to calculate my balance after each trade. Let's say my initial balance is $1000.
The data source is now an array with 9 values, I need to have a formula that adds $1000 to the first value of the array, then add the second value to the first, then add the third value to the second and so on. Something like:
New array:
1: 1000 + formatDataAsObject(get_request.data.trades)['profit'] (array first value) = x
2: x + formatDataAsObject(get_request.data.trades)['profit'] (array second value) = x1
3: x1 + formatDataAsObject(get_request.data.trades)['profit'] (array third value) = x2
Can anyone help with that? Thank you!