Bitcoin Forum
July 13, 2024, 12:20:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Trading Discussion / Re: How to calculate relative profit based on previous trades ? on: June 04, 2017, 06:37:22 PM
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.
2  Economy / Trading Discussion / How to calculate relative profit based on previous trades ? on: June 04, 2017, 12:54:28 PM
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!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!