Pages:
Author

Topic: Gekko - a javascript trading bot and backtesting platform - page 34. (Read 147876 times)

sr. member
Activity: 287
Merit: 250
Command line tool is not a good idea where you deal with empiric analysis (DEMA) with empiric coefficients. I, personally, love to understand what my money going to do  Wink

Sockets not for real time ( json 2 times faster) - this for persistent connection. Not for bot - just for Gox, which have connection problems.  

As for trading methods, I meant this:
1. buy/sell on a current float price ( btc-e didn't support this method, but it's simple and promised)
2. set order with hard price + not executed order should be canceled when(?)... you know. Chrome extension by TobbeLino didn't support this.

Thanks for your work! Hope your bot will be the best.

Good point, Gekko is going to need some sort of interface. Right now I'm thinking of creating a bookmarklet which you can run on clarkmoody that will connect to a local running Gekko and plot the advice (or the buys/sells) on the hourly graph. This would take the least amount of work and you can just use the clarkmoody graphs which are pretty good IMO.

So this would mean: user goes to clarkmoody, click a bookmark and see Gekko's advice / actions as shapes drawn on the graph.

I'm sorry but I still don't completely understand your suggestion for trade methods (not a lot of trade experience here):

1. Do you mean buy/sell on current market price on BTC-e? Because btc-e doesn't let you do an order at market price. This is how Gekko implements it right now when you configure buying/selling on btc-e:

  • Watch trends on Mt. Gox, when new trend (up/down):
  • Fetch the latest trades from btc-e (since prices are different from Mt. Gox), calculate btc-e price based on all trades in the last 20 seconds.
  • Buy/sell using this calculated price.

2. Yep this needs to added to Gekko.

Thanks for the tips Smiley


Edit For everyone who wants to help out testing Gekko but having some installation problems: I've made a tutorial on how to install and run Gekko on windows.

Installing Gekko on Windows
legendary
Activity: 1372
Merit: 1000

At the moment Gekko is just a simple command line tool (no frontend / GUI). Because it uses slow EMA, websockets to Mt. Gox would be overkill I think right? Eg. If it only needs a couple of trades every 60 minutes, not depending on anywhere near realtime.

I indeed want to abstract out all logic around buying and selling at the different exchanges so I can just plug in a new exchange. Right now the trading methods (there is only one yet Wink) are abstracted out so that the trading method can only advice and Gekko (who listens to the advice) holds the keys to the Mt. Gox API.

Command line tool is not a good idea where you deal with empiric analysis (DEMA) with empiric coefficients. I, personally, love to understand what my money going to do  Wink

Sockets not for real time ( json 2 times faster) - this for persistent connection. Not for bot - just for Gox, which have connection problems. 

As for trading methods, I meant this:
1. buy/sell on a current float price ( btc-e didn't support this method, but it's simple and promised)
2. set order with hard price + not executed order should be canceled when(?)... you know. Chrome extension by TobbeLino didn't support this.

Thanks for your work! Hope your bot will be the best.



 
sr. member
Activity: 287
Merit: 250
Gekko Update:

Gekko now also supports automatic trading via BTC-e in addition to Mt. Gox! I've also updated the readme, to clarify how to run Gekko.

edit: I've just added BTC-e and I am my Gekko is using it, but it's alpha stage to say the least.

I will add more exchanges when I have some spare time.

I agree on your thoughts about the unnecessary dependency upon Redis. If a high performance key/value store, you can use LevelDB. It's an inprocess database (no 3rd party dep)... Here is the best Node.js module that uses LevelDB: https://github.com/rvagg/node-levelup Also, there are a lot of 3rd party modules that integrate with levelup that do a lot of cool things.

Keep up the good work!

Thanks for the link. I haven't heard that much about leveldb before but will look into it, sounds pretty cool. But isn't leveldb the same kind of dependency? Right now Gekko is running fine on my laptop (OSX), my pc (Windows 7) and my server (Ubuntu). It appears) that installing leveldb for windows, for example, requires building from source using Microsoft Visual Studio (not something everyone wanting to spin Gekko for a testrun is waiting for I think).

How hard would it be to convert just the trading strategy to Java? You could use

https://github.com/ReAzem/cryptocoin-tradelib

then, and I could give you some code for a tradebot core, like I use it:

http://i.imgur.com/OoP0aNo.jpg

Maybe we could collaborate somehow?

Awesome library! If I'm understanding it correctly the libary provides easy access to a lot of exchanges right? That's definitly something Gekko needs right now.

The biggest problem for me is that I have no experience in Java, so it's pretty hard for me to read the library. Gekko is just a small project at the moment, it's just a few hundred lines of code right now. Is it possible to connect to your framework using a communication layer?

I guess the easiest to get this method (which is described in more detail by Goomboo) into your library is to just port it to Java. If you don't have a lot of experience in javascript (or nodejs), you have the advantage to look at two additional projects who implement the same trading method:


I've also just looked at how to get Gekko to talk to all exchanges using nodejs, and a lot of people have written modules for exchanges already:


It should be pretty much just plugging them into Gekko, because all connect logic is already written.
legendary
Activity: 965
Merit: 1000
How hard would it be to convert just the trading strategy to Java? You could use

https://github.com/ReAzem/cryptocoin-tradelib

then, and I could give you some code for a tradebot core, like I use it:

http://i.imgur.com/OoP0aNo.jpg

Maybe we could collaborate somehow?
jp
member
Activity: 69
Merit: 10
I agree on your thoughts about the unnecessary dependency upon Redis. If a high performance key/value store, you can use LevelDB. It's an inprocess database (no 3rd party dep)... Here is the best Node.js module that uses LevelDB: https://github.com/rvagg/node-levelup Also, there are a lot of 3rd party modules that integrate with levelup that do a lot of cool things.

Keep up the good work!
sr. member
Activity: 287
Merit: 250
Look to the:
redis ( bot have remember historical data)
reliable graphic interface ( say kind of http://bitcoincharts.com)
socket.io ( for reliable connection)
strong sell/buy algorithm, as it's different in gox/btc-e/etc. APIs.

have fun !  Wink

Thanks for your feedback Smiley

Great idea about storing historical data. Redis is great but it would mean a pretty big extra dependency for everyone who is not a developer and just wants to try/run gekko. Maybe if the difference in performance is not that big I could just go for flat file?

At the moment Gekko is just a simple command line tool (no frontend / GUI). Because it uses slow EMA, websockets to Mt. Gox would be overkill I think right? Eg. If it only needs a couple of trades every 60 minutes, not depending on anywhere near realtime.

I indeed want to abstract out all logic around buying and selling at the different exchanges so I can just plug in a new exchange. Right now the trading methods (there is only one yet Wink) are abstracted out so that the trading method can only advice and Gekko (who listens to the advice) holds the keys to the Mt. Gox API.
legendary
Activity: 1372
Merit: 1000
Look to the:
redis ( bot have remember historical data)
reliable graphic interface ( say kind of http://bitcoincharts.com)
socket.io ( for reliable connection)
strong sell/buy algorithm, as it's different in gox/btc-e/etc. APIs.

have fun !  Wink

sr. member
Activity: 287
Merit: 250
1) being able to trade on bitstamp as well
and btc-e, Vircurex etc. with different currencies  Wink

Thanks for the feedback. I will start working on getting Gekko on different exchanges.

I am thinking on calculating the EMAs based on trades done at Mt. Gox (with a fallback when Mt. Gox is down or something), but buying and selling on a configurable exchange (bitstamp, btc-e, Vircurex, campbx, etc). Because I think that at the the moment Mt. Gox sets the trading trend and all other exchanges follow it with a delay.
legendary
Activity: 2955
Merit: 1049
1) being able to trade on bitstamp as well
and btc-e, Vircurex etc. with different currencies  Wink
hero member
Activity: 518
Merit: 500
1) being able to trade on bitstamp as well
2) Working with slightly unreliable Internet connections  Grin
sr. member
Activity: 287
Merit: 250
[EDIT 2017]

Gekko is still undergoing active development, but almost all information here is outdated. Please check the code on github and everything else on the brand new shiny website:

https://gekko.wizb.it/



Here is the first version of my (open source) trading bot for node called Gekko.

Quote


The most valuable commodity I know of is information.

-Gordon Gekko

You can find the whole project on Gekko's Github repo.

Gekko is a Bitcoin trading bot and backtesting platform that connects to popular Bitcoin exchanges. It is written in javascript and runs on nodejs.

This is the open source do-it-yourself version, we are planning on running hosted Gekkos in the cloud which does not require you to download and install anything, configure any textfiles or deal with the commandline. If you are looking for such a solution, sign up at Wizbit and we'll let you know once it's out.

Use Gekko at you own risk.

Main features

Trading platform:

  • Paper trading
  • Live trading (trade bot)

Market interface:

  • Emit market events
  • Basic IRC Bot, basic Campfire Bot

Supported exchanges

  • Mt. Gox
  • Bitstamp
  • CEX.io
  • Kraken
  • BTC-e
  • Cryptsy (alomst; in the pipeline)

Trading platform

Even though there are multiple EMA trading bots in javascript (as Chrome plugins) all of Gekko's code is written from scratch. The goal of the project is for me to learn more about such systems, therefor I'm trying to keep the code as readable as possible to also attract non programmers.

Gekko can watch the realtime markets. You can apply automated trading methods to realtime data coming in to do live or simulated trading (automated trading or paper trading). Gekko also stores the market data it sees so you can run the trading methods with simulate trades on a set of historical data to see whether they would have been profitable during that time (backtesting).

Gekko, as well as the current bitcoin exchanges, are not built for HFT or anything related to being the fastest. The trading methods Gekko can do are based on indicators used by human day traders. The result is that Gekko does not look at data below the one minute timescale and (depending on configuration) and will normally not trade more than a couple of times per week (also depending on configuration).

So Gekko is not

  • A fully automated trading bot that you turn on and will generate profit withouth you having to do anything.
  • A trading platform for human day traders with a GUI and charts.
  • A High frequency trading bot designed to operate on < minute resolution.
  • An exchange.

Market interface

Gekko also has a plugin system that can do certain things whenever something happens or let Gekko communicate through more platforms. Gekko currently knows these plugins:

  • Campfire: Enables Gekko to talk on Campfire and report latest market data and advice.]
  • IRC bot: Enables Gekko to talk on IRC and report latest market data and advice.
  • Mailer: Automatically sends email when your trading method has new advice.
  • Profit Simulator (paper trader): Hold a fake portfolio and simulate trades based on advice.
  • Redis Beacon: Broadcast events propagating through Gekko on Redis pub/sub.

Installing Gekko

Windows user? Here is a step-by-step guide on how to get Gekko running!

Because Gekko runs on node you need node installed. You can find more detailed instructions on how to install Gekko in the install section of the README.

Configuring Gekko

Configuring Gekko consists of three parts:

  • Watching a realtime market
  • Automate trading advice
  • Enabling plugins

Read the configuring Gekko documentation for a detailed explanation.

Running Gekko

To run the bot you just have to start Gekko:

Code:
node gekko

You can also run Gekko silently or use more complex features, for examples check out the advanced features.

How does Gekko work?



If you want to contribute or are interested in how Gekko works:

Pages:
Jump to: