Hi guys,
I have NO PROBLEM using ANY of the mentioned BTC units,
so if you DO NOT wanna use yours feel free to send it to me
PS: WTF is with posts like this?
If you have trouble understanding what YOU have at hand use this:
var currentPrice:Number = x; // where x means the return value of your exchange API*
var coinsToSell:Number = o; // where o means what you want to sell
function whatsThePrice(x:Number, o:Number):Number{
// the price is:
var result:Number;
result = o*x;
return result;
}
If the above is too hard to understand then:
If you wanna sell 0.23555489BTC and the price now is 480$ let's say you get: 0.23555489 * 480 = $113.066 (rounded)
So what you are asking (IF NOT ALREADY) is very easily implemented in any software.
*the exchange value depends on your exchange.
EDIT: In fact the above function will work with: C, C++, Java, JS, AS and some others that I am probably not aware of.
What else do you want?
Do note that some languages prefer the term "double", bu tthe principle is the same
EDIT 2: Sorry, I was just asked in PM how does my code work, so I thought I post here just in case anyone else wants to know.
You are basically asking the function to perform the calculation for you:
example: I have 3 BTC for sale and want a good price
heres how it goes (simple):
I first receive the current going price from my exchange - my case Bitstamp - for example reasons lets say I got a return of $383.
If that is the price I want I send a call function with:
var whatIgetNow:Number = whatsThePrice(3, 383); // normally BOTH numbers would have been replaced by variables according to schedule)
the return value would be: $1149 - 3*383 = 1149
That is the simple use for it, however you could expand it to a bot if you wanted to....
example:
if(x==500){
//sell with profit
}else{
//HODL!!!!
}
I could easily say DO NOT sell if under this much by going:
if(x<250){
//HODL!
}else{
//it's all good for trading IF YOU KNOW WHAT YOU ARE DOING!!!!!
}
There is much more you can do with it, my question is that WHY do people spend more time whining about things than getting things done?
PS: To all the "gurus" out there, this is just an example of VERY simple ways of getting things done
So, yeah I know, no need for you to say anything