Bitcoin Forum
October 23, 2017, 01:01:42 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 [4] 5 »  All
  Print  
Author Topic: Trading Bots  (Read 12516 times)
mem
Hero Member
*****
Offline Offline

Activity: 644


Herp Derp PTY LTD


View Profile
April 11, 2012, 03:53:05 AM
 #61

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

1508720502
Hero Member
*
Offline Offline

Posts: 1508720502

View Profile Personal Message (Offline)

Ignore
1508720502
Reply with quote  #2

1508720502
Report to moderator
1508720502
Hero Member
*
Offline Offline

Posts: 1508720502

View Profile Personal Message (Offline)

Ignore
1508720502
Reply with quote  #2

1508720502
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
notme
Legendary
*
Offline Offline

Activity: 1820


View Profile
April 11, 2012, 03:59:02 AM
 #62

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

Mine just plays the spread with stop orders at medium-term technical support and resistance.  When we move big, my stop makes sure I catch most of the move with enough of my capital.  Then, it goes back to liquidity-bot mode and I adjust the stops.  I haven't really backtested it, but it has a decent amount of live testing with small amounts.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
mem
Hero Member
*****
Offline Offline

Activity: 644


Herp Derp PTY LTD


View Profile
April 11, 2012, 05:45:19 AM
 #63

if you want ~3weeks of time,buy,sell logs for running sims send me a PM Smiley

Seal
Donator
Hero Member
*
Offline Offline

Activity: 836


View Profile WWW
April 11, 2012, 05:57:33 AM
 #64

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

Mine just plays the spread with stop orders at medium-term technical support and resistance.  When we move big, my stop makes sure I catch most of the move with enough of my capital.  Then, it goes back to liquidity-bot mode and I adjust the stops.  I haven't really backtested it, but it has a decent amount of live testing with small amounts.

What languages are you guys using with your trading algos? I'm using PHP in mine but it lacks some of the statistical analysis tools that I need for trading the basic technical indicators.

notme
Legendary
*
Offline Offline

Activity: 1820


View Profile
April 11, 2012, 06:07:46 AM
 #65

if you want ~3weeks of time,buy,sell logs for running sims send me a PM Smiley

Meh... I can pull all the data from bitcoincharts.com in a few minutes, but thanks anyway

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
notme
Legendary
*
Offline Offline

Activity: 1820


View Profile
April 11, 2012, 06:10:39 AM
 #66

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

Mine just plays the spread with stop orders at medium-term technical support and resistance.  When we move big, my stop makes sure I catch most of the move with enough of my capital.  Then, it goes back to liquidity-bot mode and I adjust the stops.  I haven't really backtested it, but it has a decent amount of live testing with small amounts.

What languages are you guys using with your trading algos? I'm using PHP in mine but it lacks some of the statistical analysis tools that I need for trading the basic technical indicators.

Mine is ruby... I'm not really using stat tools as I adjust the stops manually, but I'm sure there are some good packages out there for ruby.

Since mem's is called bitperl.pl, I'm going to guess it's in Perl, the Pathologically Eclectic Rubbish Lister.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
Seal
Donator
Hero Member
*
Offline Offline

Activity: 836


View Profile WWW
April 11, 2012, 06:26:54 AM
 #67

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

Mine just plays the spread with stop orders at medium-term technical support and resistance.  When we move big, my stop makes sure I catch most of the move with enough of my capital.  Then, it goes back to liquidity-bot mode and I adjust the stops.  I haven't really backtested it, but it has a decent amount of live testing with small amounts.

What languages are you guys using with your trading algos? I'm using PHP in mine but it lacks some of the statistical analysis tools that I need for trading the basic technical indicators.

Mine is ruby... I'm not really using stat tools as I adjust the stops manually, but I'm sure there are some good packages out there for ruby.

Since mem's is called bitperl.pl, I'm going to guess it's in Perl, the Pathologically Eclectic Rubbish Lister.

Hey notme, forgive me if i'm being naive but surely you must do some kind of price analysis to form your strategy. Does it read off day high/lows to establish your spread? Does it enter/exit positions?

notme
Legendary
*
Offline Offline

Activity: 1820


View Profile
April 11, 2012, 07:24:05 AM
 #68

indeed, atm it is live and in operation but only with a tiny amount of BTC.

My algorithm is to basic atm, but I have all the structure there. Currently Im working on making the trading algo modular so I can run simulations on multiple algo's.

Mine just plays the spread with stop orders at medium-term technical support and resistance.  When we move big, my stop makes sure I catch most of the move with enough of my capital.  Then, it goes back to liquidity-bot mode and I adjust the stops.  I haven't really backtested it, but it has a decent amount of live testing with small amounts.

What languages are you guys using with your trading algos? I'm using PHP in mine but it lacks some of the statistical analysis tools that I need for trading the basic technical indicators.

Mine is ruby... I'm not really using stat tools as I adjust the stops manually, but I'm sure there are some good packages out there for ruby.

Since mem's is called bitperl.pl, I'm going to guess it's in Perl, the Pathologically Eclectic Rubbish Lister.

Hey notme, forgive me if i'm being naive but surely you must do some kind of price analysis to form your strategy. Does it read off day high/lows to establish your spread? Does it enter/exit positions?

I manually adjust the spread as conditions change.  It is very much not a set it and forget it type of bot.  It maintains orders above and below the current price at double my spread. When an order is hit, the opposite order is placed at the spread.  It has some escape conditions based on past experiences of getting caught heavily against the trend, as well as stop loss orders.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
Seal
Donator
Hero Member
*
Offline Offline

Activity: 836


View Profile WWW
April 11, 2012, 01:13:33 PM
 #69

Aah I see notme, thanks for sharing.

Anyway, I had a look around and found this: http://finasystem.sourceforge.net/

Its a PHP library written for 50 of the most popular technical indicators. The project has not been updated in a very long time (dates back to 2006) but it looks pretty comprehensive. I'm going to have a play with these and I'll report back with how it performs.

I found one that is current called TA-Lib however thats only in C/C++, Java, Perl, Python: http://ta-lib.org/ if anyones interested.

In the mean time, if anyone finds a more current open-source project for technical indicators in PHP, let us know.

mem
Hero Member
*****
Offline Offline

Activity: 644


Herp Derp PTY LTD


View Profile
April 11, 2012, 01:52:39 PM
 #70

if you want ~3weeks of time,buy,sell logs for running sims send me a PM Smiley

Meh... I can pull all the data from bitcoincharts.com in a few minutes, but thanks anyway

you think you can Tongue, but the reality is it is nowhere near as granular Wink

I suppose if your not worried about high frequency trading then its not an issue.

yes to perl, the sysadmins friend Smiley .

I use some basic trend prediction atm I have pulled straight from wikipedia and implemented in perl.
Most of the current work is going into automating sims so I can belt out all the variances (algo's, margins & trend prediction) and have the app tell me which one is the best.

Mine is setup to be completely automated, you will just select a set of parameters (trading style, target margin profit for each trade) and be able to view remotely via a cgi web interface. It will have the option to force sell, pause, margin adjust and cashout.

Once Im happy with the code I will gpl it.

Jay_Pal
Legendary
*
Offline Offline

Activity: 1357



View Profile
April 12, 2012, 08:30:58 PM
 #71


Excellent work!
Thanks for the help!

Best faucet EVER! - Freebitco.in
Don't Panic... - 1G8zjUzeZBfJpeCbz1MLTc6zQHbLm78vKc
Why not mine from the browser?
naima53
Hero Member
*****
Offline Offline

Activity: 616



View Profile
April 13, 2012, 01:27:28 PM
 #72

Please help me find a bug in the code. (PHP) The calculation of the average rate for the last transaction (bot). He should ignore history, which more than 15 minutes. But the error - consider history. (sorry for the translation)
Code:
Function midrate($key, $secret){
$curtime = 0;
$ttype = "x";
$total = 0;
$qty = 0;
$decoded_t1=(mtgox_query($key, $secret, '1/generic/private/trades'));
  $decoded_t = array_reverse($decoded_t1['return']);
  $i=0;
    foreach ($decoded_t as $a) {
    if((($i>0) && ($ttype != $a['trade_type'])) || (($i>0) &&(($curtime - $a['date']) > (60*15)))){
      break;
    }
      if ($a['trade_type']=="bid"){
        //$stype = "Sale";
       $ttype = "bid";
       $curtime = $a['date'];
       $total += ($a['amount'] * $a['price']);
       $qty += $a['amount'];
      }else{
        if($a['trade_type']=="ask"){
       // $stype = "Buy";
        $ttype = "ask";
        $curtime = $a['date'];
        $total += ($a['amount'] * $a['price']);
        $qty += $a['amount'];
        }
      }
    ++$i;
    }
    $newrate = $total / $qty;
    if($newrate > 0){
      return $newrate;
    }else{
      return false;
    }
 }
//-------------------------------------

Donate me) 16f6iWHHkVEnDReeBQPT9GwCNwUfPTXrp2
bitcoinBull
Legendary
*
Offline Offline

Activity: 826


rippleFanatic


View Profile
April 13, 2012, 06:02:23 PM
 #73

Please help me find a bug in the code. (PHP) The calculation of the average rate for the last transaction (bot). He should ignore history, which more than 15 minutes. But the error - consider history. (sorry for the translation)

$curtime is set to 0 and never to the current time, so ($curtime - $a['date']) is negative and never > (60*15).

add:

$curtime = time();


College of Bucking Bulls Knowledge
Kettenmonster
Sr. Member
****
Offline Offline

Activity: 420


bool eval(bool b){return b ? b==true : b==false;}


View Profile
April 13, 2012, 06:10:14 PM
 #74

Code:
Function midrate($key, $secret){
...
    if((($i>0) && ($ttype != $a['trade_type'])) || (($i>0) &&(($curtime - $a['date']) > (60*15)))){
      break;
    }

Looks broken to my eyes before even thinking about it.
Guys please keep coding simple and straight forward.
Comments are allowed and considered to be a polite move.

What is $i>0 good for? How about a proper init before looping?

Code:
$curtime = $a['date'];
guess where I found that ... what will it do in the breaking if?



The paining (sic!) is done with the QPainter class inside the paintEvent() method.
(source: my internet)
Kettenmonster
Sr. Member
****
Offline Offline

Activity: 420


bool eval(bool b){return b ? b==true : b==false;}


View Profile
April 13, 2012, 06:16:08 PM
 #75

Please help me find a bug in the code. (PHP) The calculation of the average rate for the last transaction (bot). He should ignore history, which more than 15 minutes. But the error - consider history. (sorry for the translation)

$curtime is set to 0 and never to the current time, so ($curtime - $a['date']) is negative and never > (60*15).

add:

$curtime = time();



Could it be that ($curtime == 0) implies (i==0).
So the real killer is to wait for a 15 min pause in transactions.
Provided I got it right.

The paining (sic!) is done with the QPainter class inside the paintEvent() method.
(source: my internet)
naima53
Hero Member
*****
Offline Offline

Activity: 616



View Profile
April 14, 2012, 04:16:18 PM
 #76

Thank you very much, friends! I will send this thread to administrator! Maybe this will solve the problem! ( at pool http://pool.mkalinin.ru the ability to use a bot).

Donate me) 16f6iWHHkVEnDReeBQPT9GwCNwUfPTXrp2
Kettenmonster
Sr. Member
****
Offline Offline

Activity: 420


bool eval(bool b){return b ? b==true : b==false;}


View Profile
April 15, 2012, 05:38:55 PM
 #77

Thank you very much, friends!
You ´re welcome, plus this might help increasing your coding skills.

What is that
Code:
    $newrate = $total / $qty;
    if($newrate > 0){
      return $newrate;
    }else{
      return false;
    }
meant to do?
 ... uhm where is the Candid Camera?

The paining (sic!) is done with the QPainter class inside the paintEvent() method.
(source: my internet)
fujiwara
Jr. Member
*
Offline Offline

Activity: 38


View Profile
April 15, 2013, 05:42:30 PM
 #78

is this still alive? anyone running the bot? sounds promising, ...
notme
Legendary
*
Offline Offline

Activity: 1820


View Profile
April 15, 2013, 06:40:12 PM
 #79

I just dusted off my bot since the recent top to help add liquidity.  I've published it here:

https://github.com/yrral86/rubybot

It's very rough at the moment (any previous comments made in this thread by me about my bot apply), but hopefully in a few weeks I'll have some time to spend cleaning things up and making it more robust.  Then I can give it some real money.

It's happily running right now, just with tiny orders.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
fujiwara
Jr. Member
*
Offline Offline

Activity: 38


View Profile
April 15, 2013, 07:58:38 PM
 #80

what do I need to run it? (on linux)
Pages: « 1 2 3 [4] 5 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!