Realized profit calculation
This is, equation to find out how much money you made in trading. useful with re-balance and grid If you trade forex before and you jump to crypto, you gonna miss the realized profit. the first I know if I wanna get my profit I must do a transaction history on my own, for example, I bought at 10 and sell at 15, I got 5 as my realized profit, it work perfectly fine, but I start have a problem when I have so many portfolio to handle. So I need figure out this equation to help me solve the problem, The concept is easy, it have two scenario if price higher than the start or the price lower than the start, First we need to note our start assets and price when initial, First price lower than the start. Because grid or re-balance had significant to sell all the way before we hit the start price, and current price is lower how much many we actually had? The first we need to know what exposure we need to adjust at that price for example I need to hold 1.9798 LTC when price at 99.500 ...