Author

Topic: How to calculate relative profit based on previous trades ? (Read 241 times)

newbie
Activity: 2
Merit: 0
Thanks @2bfree for your input. I am aware that exchange fees still need to be accounted for. However, right now I am trying to find the relative percentage change of my last balance, accounting for all the previous transactions. I don't know what formula exactly I should be using for this.
sr. member
Activity: 686
Merit: 251
I'm investigating Crypto Projects
When you buy and sell on the exchange there are total BTC 2 times one of them is slightly smaller for the small commission amount so use that total to subract when you sell then you will know true profit.
newbie
Activity: 2
Merit: 0
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:

Quote
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!
Jump to: