OK, so I want to make a little profit calculator for myself based on my trade history from Poloniex.
Here's a purely fictional and simplified example:
BUY 10 ETC for 0.01 BTC (0.0010 BTC / ETC)
BUY 50 ETC for 0.04 BTC (0.0008 BTC / ETC)
SELL 50 ETC for 0.05 BTC (0.0010 BTC / ETC)
BUY 10 ETC for 0.03 BTC (0.0015 BTC / ETC)
SELL 15 ETC for 0.02 BTC (0.0020 BTC / ETC)
Current ETC price: 0.0022 BTC
In this example, I still have 5 ETC, which at the current rate is worth 0.011 BTC
But here's what I'm struggling with:
What is the percentage change of my current balance (5 ETC), relative to my previous transactions ?Remember, I bought and sold at different rates!
I would like the percentage change to reflect a positive number, because overall, I still gained a profit of the ETC that I kept, even though I also sold most of it with a profit already.
Could someone please explain the steps on how I can calculate this? It would help a lot!