Bitcoin Forum
October 17, 2017, 12:27:47 AM
 News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 Home Help Search Donate Login Register
 Pages: 1 [2]  All
 Author Topic: Quick math question.  (Read 2945 times)
NothinG
Hero Member

Offline

Activity: 560

 August 11, 2011, 06:59:24 PM

If you want me to change the math around, give me a formula to work with.
So far everyone keeps saying my math is wrong.

• Token Sale: OCTOBER 12
• myMDN.io
• \$15 Million Hardcap
Week One: 20% Bonus
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508200067
Hero Member

Offline

Posts: 1508200067

Ignore
 1508200067

1508200067
 Report to moderator
Elwar
Legendary

Offline

Activity: 2254

www.bitpools.com

 August 11, 2011, 07:08:35 PM

Looks fine. You just do a \$fee / 1000

Which is screwy since you have the decimal specified before the input.

So someone putting in: .60 and someone putting in .6 would end up with
60 / 1000
and
6 / 1000

Two very different numbers.

I am not sure how to add a decimal before a number in php.

http://www.bitpools.com
Pool your bitcoins with others. Vote on solutions using the Bitcoin blockchain. Keep your bitcoins in your cold storage until you find a solution you like.
Links and Reviews of useful every day places to spend bitcoins: https://bitcointalk.org/index.php?topic=943143.0
NothinG
Hero Member

Offline

Activity: 560

 August 11, 2011, 07:30:41 PM

Looks fine. You just do a \$fee / 1000

Which is screwy since you have the decimal specified before the input.

So someone putting in: .60 and someone putting in .6 would end up with
60 / 1000
and
6 / 1000

Two very different numbers.

I am not sure how to add a decimal before a number in php.
I forgot I could divide with decimals.
[/fail]
xD

Vandroiy
Legendary

Offline

Activity: 1036

 August 11, 2011, 09:23:11 PM

Profit criterion:

Buy price * (1 - commission fraction)^2 > sell price

Just use Wolfram Alpha when you have a browser around. For simple calculations, it responds quickly in JavaScript.
Ellen Alemany
Member

Offline

Activity: 85

 August 11, 2011, 09:37:44 PM

I buy 10 bitcoins at \$10 each, cost is \$100 plus \$0.65 commission.
I sell 10 bitcoins at \$10.12 each, I get \$101.20 and pay \$.55 commission.
It is not reasonable that for a larger transaction the commission is lower, it should be the other way around so there is a mistake here?
---

If f is the fee, B is the buying price and S is the selling price then break even is found when S/B = (1+f)/(1-f) since:
Our income = -B*(1+f) + S*(1-f) > 0 => S/B > (1+f)/(1-f)

In the case 0.003 and 0.0065 we get 1.00601805 and 1.01308505.

In other words, if you buy at \$10, you sell at \$10*1.01308505 or roughly \$10.13.

"There must be more to life than having everything."
phorensic
Hero Member

Offline

Activity: 630

 August 12, 2011, 01:08:54 AM

What's funny is I have been using the dang Windows calculator do this for weeks and I have been wondering: "I wonder if someone has made an online app for this?"  Prayer answered!  Thank you sir
NothinG
Hero Member

Offline

Activity: 560

 August 12, 2011, 01:56:02 AM

What's funny is I have been using the dang Windows calculator do this for weeks and I have been wondering: "I wonder if someone has made an online app for this?"  Prayer answered!  Thank you sir
No problem.

Simple usage for JSON in PHP?
Code:
<?php
echo minSell();

function
minSell(\$volume=1,\$ppb="live",\$bfee=0.3,\$sfee=0.3)
{
\$url .= "volume=".\$volume;
if(\$ppb=="live")
\$url .= "&liveppb=on";
else
\$url .= "&ppb=".\$ppb;
\$url .= "&bfee=".\$bfee;
\$url .= "&sfee=".\$sfee;
\$json file_get_contents(\$url."json=on");
\$obj json_decode(\$json);
return \$obj->{'mmsppb'};
}
?>

Like it?
1vfMrL8FWtKtUyUkarzotS3Q8Q9SQCopL

Bitcoin Swami
Full Member

Offline

Activity: 182

 August 12, 2011, 05:02:58 AM

Thanks alot man, you should put your donate address on the page.

I will donate when I mine a few more.

Glad other people think this was a good idea too!

Mike
NothinG
Hero Member

Offline

Activity: 560

 August 12, 2011, 05:10:15 AM

Thanks alot man, you should put your donate address on the page.

I will donate when I mine a few more.

Glad other people think this was a good idea too!

Mike

If anyone has something I should add, let me know.

Tasty Champa
Member

Offline

Activity: 84

 August 15, 2011, 03:17:33 AM

Thanks alot man, you should put your donate address on the page.

I will donate when I mine a few more.

Glad other people think this was a good idea too!

Mike

If anyone has something I should add, let me know.

other way around. like how much money equals bitcoins minus fee.
NothinG
Hero Member

Offline

Activity: 560

 August 15, 2011, 03:19:09 AM

Thanks alot man, you should put your donate address on the page.

I will donate when I mine a few more.

Glad other people think this was a good idea too!

Mike

If anyone has something I should add, let me know.

other way around. like how much money equals bitcoins minus fee.
I don't understand.

dub0matic
Full Member

Offline

Activity: 182

 August 15, 2011, 03:36:12 AM

doesnt work to good. i just use mtgox calculator. but good job anyways

make it rain haha
btc 176MrZ3CCXGb1GqFiGaoqQpaynzYqZsW6n
NothinG
Hero Member

Offline

Activity: 560

 August 15, 2011, 03:42:45 AM

doesnt work to good. i just use mtgox calculator. but good job anyways
How does it not work too well?
What's wrong with it?

dub0matic
Full Member

Offline

Activity: 182

 August 15, 2011, 03:44:02 AM

doesnt work to good. i just use mtgox calculator. but good job anyways
How does it not work too well?
What's wrong with it?
you cant change the price

make it rain haha
btc 176MrZ3CCXGb1GqFiGaoqQpaynzYqZsW6n
Elwar
Legendary

Offline

Activity: 2254

www.bitpools.com

 August 18, 2011, 06:07:39 PM

doesnt work to good. i just use mtgox calculator. but good job anyways
How does it not work too well?
What's wrong with it?
you cant change the price

You can change the price. Just turn off the options to the right of price.

Also, I finally saw on MtGox that they are saying .65% per trade on the trade page.

http://www.bitpools.com
Pool your bitcoins with others. Vote on solutions using the Bitcoin blockchain. Keep your bitcoins in your cold storage until you find a solution you like.
Links and Reviews of useful every day places to spend bitcoins: https://bitcointalk.org/index.php?topic=943143.0
GeniuSxBoY
Hero Member

Offline

Activity: 616

 August 19, 2011, 01:47:08 PM

Mine says Mt Gox charges a small fee (0.43 %) for each trade.

I'm so confused lol

Be humble!
Elwar
Legendary

Offline

Activity: 2254

www.bitpools.com

 August 25, 2011, 12:18:59 PM

Bump for a useful tool.

Thank you!

http://www.bitpools.com
Pool your bitcoins with others. Vote on solutions using the Bitcoin blockchain. Keep your bitcoins in your cold storage until you find a solution you like.
Links and Reviews of useful every day places to spend bitcoins: https://bitcointalk.org/index.php?topic=943143.0
 Pages: 1 [2]  All
 « previous topic next topic »