Pages:
Author

Topic: HAL 10K - Bitcoin PHP trading bot - page 4. (Read 24308 times)

newbie
Activity: 27
Merit: 0
January 07, 2014, 10:56:27 AM
#54
I'm testing it, but it handles weird values. As of now, mtgox high/low are at 1,044 - 956, but HAL 10k is bidding at 703. ¿?
member
Activity: 95
Merit: 10
January 07, 2014, 08:56:28 AM
#53
open source trading bots are a great idea, although only live environment testing will show results. We are working on an API in our Bitcoin exchgange game, so you will have a nice training ground for the trading bots.
member
Activity: 75
Merit: 10
HAL10K developer
January 07, 2014, 08:44:56 AM
#52
1 - When bots buy/sell at "Sudden mode(loss)", its off the current price, so he scores off the chart, is correct ..
2- Sorry about that weird code lines after processing, its because I forgot to turn off debug Smiley (its not an error..)

First of all, thanks for making this amazing opensource tradingbot! Cheesy
The graph works like a charm (but sometimes the 'buy' and the 'sell' points are not on the yellow USD/BTC line)
There is however one problem I come across everytime I run the code.
Code:
*** Processing order... done!array(8) {
  ["type"]=>
  string(3) "bid"
  ["amount"]=>
  float(2.0119309811464)
  ["price"]=>
  string(6) "1044.1"
  ["datetime"]=>
  string(19) "2014-01-07 09:13:10"
  ["success"]=>
  string(26) "98374829984767289039847839"
  ["status"]=>
  string(9) "processed"
  ["prem"]=>
  string(4) "loss"
  ["sudden_mode"]=>
  int(0)
}
After 'Processing...Done! He gives some weird code lines what seems to be code that need to be executed. Does anyone know how to solve this?
Also, (newbie question) where can you see the profit you made? Thanks in advance!
member
Activity: 75
Merit: 10
HAL10K developer
January 07, 2014, 08:24:31 AM
#51
He BID at 1000 and will ASK at 1010 (because $percentual and $bidfee not applies at ASK, only BID), if you want to configure profit margin at next ASK uses $up_diff.
I know, its confusing.., will improve it to let more intuitive.

Its configured, but i think the bot is ignoring the $percentual value and instead of it is using $up_diff value, what you think?
newbie
Activity: 5
Merit: 0
January 07, 2014, 05:15:44 AM
#50
First of all, thanks for making this amazing opensource tradingbot! Cheesy
The graph works like a charm (but sometimes the 'buy' and the 'sell' points are not on the yellow USD/BTC line)

There is however one problem I come across everytime I run the code.

Code:
$ 1035.015  bid @ 1014 stoploss: 1040 (last: ask @ 1020 [profit])
*** EMAShort1032.44 / EMALong1028.07
*** High volume detected! 146994.68
*** Checking for open orders...  no orders.
$ 1042 bid @ 1014 stoploss: 1040 (last: ask @ 1020 [profit])
*** #Hit wall!
*** #SUDDEN MODE on!
$ bid 2.0119309811464 @ $1044.1 (prev: 1020) - 2014-01-07 09:13:10
array(2) {
  ["result"]=>
  string(7) "success"
  ["data"]=>
  string(26) "98374829984767289039847839"
}
*** Processing order... done!array(8) {
  ["type"]=>
  string(3) "bid"
  ["amount"]=>
  float(2.0119309811464)
  ["price"]=>
  string(6) "1044.1"
  ["datetime"]=>
  string(19) "2014-01-07 09:13:10"
  ["success"]=>
  string(26) "98374829984767289039847839"
  ["status"]=>
  string(9) "processed"
  ["prem"]=>
  string(4) "loss"
  ["sudden_mode"]=>
  int(0)
}

*** EMAShort1036.99 / EMALong1030.62
*** Checking for open orders...  no orders.

After 'Processing...Done! He gives some weird code lines what seems to be code that need to be executed. Does anyone know how to solve this?

Also, (newbie question) where can you see the profit you made?

Thanks in advance!
sr. member
Activity: 378
Merit: 250
January 06, 2014, 11:40:21 AM
#49
Yes, take a look at $bidfee value too!
Quote
Oh I see Smiley So why HAL is trying to sell @ 1090 (when he bought on 1089), when "$percentual" value is set to "1.45" and 1089*1.0145 = 1104.7905  <<< he should want to sell it on 1104.7905, no 1090(with loss because of fees), right?

config
Code:
$percentual=1.45; //Minimum percentage of profit on the purchase (Use the current fee applied by MtGox);
$bidfee=1.45; //Just for simulation purposes (Use the current fee applied by MtGox);
$up_diff=10; //(sell) profit points (in USD) above the purchase price;
$up_diff_inv=500; //(sell) stop loss (in USD) below the purchase price;
$down_diff=1; //(buy) profit points (in USD) below the selling price;
$down_diff_inv=1; //(buy) stop loss (in USD) above the selling price;
$secure_ticker=1; //Security value that prevents the bot to make sales below a certain value;
$fake_btc_usd_buyedprice="1000.00000";

output
Code:
*** Checking for open orders...  no orders.
$ 1012.77664 ask @ 1010 stoploss: 500 (last: bid @ 1000 [loss])

Its configured, but i think the bot is ignoring the $percentual value and instead of it is using $up_diff value, what you think?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 11:24:33 AM
#48
Yes, take a look at $bidfee value too!
Quote
Oh I see Smiley So why HAL is trying to sell @ 1090 (when he bought on 1089), when "$percentual" value is set to "1.45" and 1089*1.0145 = 1104.7905  <<< he should want to sell it on 1104.7905, no 1090(with loss because of fees), right?
sr. member
Activity: 378
Merit: 250
January 06, 2014, 11:16:12 AM
#47
He he bought at 1089, will ask at 1090 when market direction is ( means that the bot does not have enough data to generate the EMA means that the EMA has not crossed yet)

Code:
*** Checking for open orders...  no orders.
$ 1090.54999 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])

Oh I see Smiley So why HAL is trying to sell @ 1090 (when he bought on 1089), when "$percentual" value is set to "1.45" and 1089*1.0145 = 1104.7905  <<< he should want to sell it on 1104.7905, no 1090(with loss because of fees), right?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 11:00:45 AM
#46
Todolist is on github: https://github.com/intrd/bitcoin/tree/master/hal10k (at the end of readme)
would be grateful if they can assist in this project, even small fixes/improvements in code! so far I'm still alone..

Hi Intrd,
Could you give us your todolist by priority ?
Other question, I heard you had to wait a long time with Mtgox for money on his bank account. And that it is better to use Bitstamp or Bitcoincentral.
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 10:54:23 AM
#45
Nop. i've made a simple text database.. Smiley
Very nice thank you for this. Does this need also need an SQL server to run?
newbie
Activity: 46
Merit: 0
January 06, 2014, 10:03:10 AM
#44
Very nice thank you for this. Does this need also need an SQL server to run?
newbie
Activity: 15
Merit: 0
January 06, 2014, 09:49:15 AM
#43
Hi Inrd,

Could you give us your todolist by priority ?

Other question, I heard you had to wait a long time with Mtgox for money on his bank account. And that it is better to use Bitstamp or Bitcoincentral.
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 07:15:26 AM
#42
I believe that works! take the test in Paper trading.. (i've put EUR in todolist also, thank you for remembering)

Nice work so far.
Since I'm European, I am more interested in EUR prices. How much impact, do you think, would changing the currency in MtGoxClient.php have?
Code:
$this->pair = 'BTCUSD';
to
Code:
$this->pair = 'BTCEUR';
Besides showing a dollar sign next to each price of course, would that mess up things?
newbie
Activity: 6
Merit: 0
January 06, 2014, 06:49:16 AM
#41
Nice work so far.

Since I'm European, I am more interested in EUR prices. How much impact, do you think, would changing the currency in MtGoxClient.php have?

Code:
$this->pair = 'BTCUSD';

to

Code:
$this->pair = 'BTCEUR';

Besides showing a dollar sign next to each price of course, would that mess up things?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 06:31:41 AM
#40
The bot make moves when the market price crosses EMA lines.. (you can delay it by settings $emaDiff in USD)
And how the bot know, when he should buy-in ?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 06:28:57 AM
#39
He he bought at 1089, will ask at 1090 when market direction is ( means that the bot does not have enough data to generate the EMA means that the EMA has not crossed yet)

another questions on table  Smiley
Code:
*** Checking for open orders...  no orders.
$ 1090.54999 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
what does it mean? the bot is placing sell order for that 1.0 BTC(btw the bot is still going "all-in?") @ 1089 ?
But the price was already higher than 1089 for a minute, and he not sold it, why? Or am I reading this wrong? Smiley
And how the bot know, when he should buy-in ?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 06:24:43 AM
#38
At the moment, to start with USD instead of BTC is only possible manually.. by turning off the $reset_data; editing the file: fakegox.txt USD balance and setting an "ask" on file last.txt, (now placed in the todolist the $fake_usd_balance, this feature will be available soon)

You welcome !  Smiley And thanks for replies and fix.
I want to ask ... for a test run, am I able to set "fake_usd_balance" somewhere? I found where to set "fake_btc_balance" but not USD balance, can you point me to the right direction please?
sr. member
Activity: 378
Merit: 250
January 06, 2014, 06:17:37 AM
#37
another questions on table  Smiley

Code:
*** Checking for open orders...  no orders.
$ 1090.54999 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
*** EMAShort / EMALong
*** Checking for open orders...  no orders.
$ 1090.54999 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
*** EMAShort / EMALong
*** Checking for open orders...  no orders.
$ 1082.48577 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
*** EMAShort / EMALong
*** Checking for open orders...  no orders.
$ 1070.00000 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
*** EMAShort / EMALong
*** Checking for open orders...  no orders.
$ 1086.82002 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])
*** EMAShort / EMALong
*** Checking for open orders...  no orders.
$ 1089.99000 ask @ 1090 stoploss: 589 (last: bid @ 1089 [loss])

what does it mean? the bot is placing sell order for that 1.0 BTC(btw the bot is still going "all-in?") @ 1089 ?
But the price was already higher than 1089 for a minute, and he not sold it, why? Or am I reading this wrong? Smiley

And how the bot know, when he should buy-in ?
sr. member
Activity: 378
Merit: 250
January 06, 2014, 06:03:59 AM
#36
You welcome !  Smiley And thanks for replies and fix.

I want to ask ... for a test run, am I able to set "fake_usd_balance" somewhere? I found where to set "fake_btc_balance" but not USD balance, can you point me to the right direction please?
member
Activity: 75
Merit: 10
HAL10K developer
January 06, 2014, 05:48:42 AM
#35
Yes, it is.. up/down diff on 500(never stop loss) and +1% on $percentual.

Quote
Its working now Wink
What should i set if I never want to sell at loss? (better waiting for price regeneration... the hell, its bitcoin Cheesy
But i want to take profit lets say with every 1% of increase from buying price? Something like this?  >>>
/* Custom trading algoritm parameters */
   $percentual=1.45; //Minimum percentage of profit on the purchase (Use the current fee applied by MtGox);
   $bidfee=0.45; //Just for simulation purposes (Use the current fee applied by MtGox);
   $up_diff=1; //(sell) profit points (in USD) above the purchase price;
   $up_diff_inv=500; //(sell) stop loss (in USD) below the purchase price;
   $down_diff=1; //(buy) profit points (in USD) below the selling price;
   $down_diff_inv=500; //(buy) stop loss (in USD) above the selling price;
Pages:
Jump to: