Post
Topic
Board Speculation
Re: Quick math question.
by
Elwar
on 11/08/2011, 17:34:36 UTC
I know this question might seem a bit dumb but how much does the price need to go up on mt. gox before I can sell at a profit with their normal fee.

Say I bought one btc at 10, how much would it have to rise.  6 cents?
It takes a buy at $10.00 and a sell at $10.12 to break even.

Commission is (normally) .65%, so:

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.

Sell-Buy: $101.20 - $100 = $1.20
Total Commission: $1.20

Result: Breakeven

Hopefully I did this right Tongue
http://zombietoday.com/trade_calculator.php

Code:
echo "
What's the minimum price I would have to sell back at to break even?
"
;
if(
$_GET['volume']>&& $_GET['ppb']>&& is_numeric($_GET['volume']) && is_numeric($_GET['ppb']) && $_GET['fee']>&& is_numeric($_GET['fee']))
{
$volume $_GET['volume'];
$ppb $_GET['ppb'];
$fee $_GET['fee'];
$fee_c = ($fee 1000); //yea, I know...decided to not use the full percentage
$total_buy $volume $ppb;
$min_sell $total_buy + ($total_buy $fee_c);

echo "[Buy]: ".$total_buy."";
echo "[Sell]: ".$min_sell."";
echo "You paid ".$total_buy." USD for ".$volume." BTC; you will need to sell back at ".$min_sell." USD to break even.";

} else {
$mtGoxAVG mtGoxAvg();
echo "";
echo "Buy  @ .$mtGoxAVG."'>";
echo "Fee 0.% ";
echo "";
}
function 
mtGoxAvg()
{
$opts = array(
  'http'=> array(
'method'=>   "GET",
'user_agent'=>    "MozillaXYZ/1.0"));
$context stream_context_create($opts);
$json file_get_contents('https://mtgox.com/code/data/ticker.php'false$context);
$jdec json_decode($json);
return $jdec->{'ticker'}->{'avg'};
}
?>

[edit]: I have no idea what I coded...lol. Modify it math nerds Grin

Well done. It would help to add at the end "Price to sell back at to break even: "   eg. 10.12