Bitcoin Forum
June 27, 2024, 10:30:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to calculate relative profit based on previous trades ?  (Read 226 times)
user11001 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 04, 2017, 12:54:28 PM
Last edit: June 04, 2017, 02:07:09 PM by user11001
 #1

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!
2bfree
Sr. Member
****
Offline Offline

Activity: 686
Merit: 251


I'm investigating Crypto Projects


View Profile WWW
June 04, 2017, 03:23:47 PM
 #2

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.

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
>>FREE SEO AUDIT/WHITE LABEL MAKE MONEY!<<
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
user11001 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 04, 2017, 06:37:22 PM
 #3

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!