Pages:
Author

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

sr. member
Activity: 287
Merit: 250
Big update!

I've implemented some new features yesterday, the bot has been running overnight but it still needs a lot of more testing to determine how stable it is.

Gekko is now able to watch trends at BTC-e

It appears that it is not possible to get historical data from BTC-e, so when you set it to watch btc-e Gekko will use data from bitcoincharts instead. You can set Gekko to watch and trade at these different currencies at the moment: USD, EUR and RUR.

Gekko cannot handle altcoins at the moment because I can't find any datasource (API) for them.

Gekko can now automatically mail you on new advice

This currently only works for Gmail and Google apps accounts. To enable this you need to set your email in address, you also have to provide your email password because Gekko will use your email address to send mails to yourself.

Make sure you've looked at the code before you provide your email address and password. Under the hood Gekko uses the emailjs module to send the email. Gekko is in NO way able to read your email or whatever and your email address and password are only sent to the gmail servers (over SSL).

(I don't like this solution very much, but I'm also not comfortable with shipping an API key for a service like Sendgrid. If anybody has a better idea that works cross platform, please let me know)

You can set the new features in Gekko's config.

Helping with Gekko

To stabilise Gekko and remove all bugs we need a lot of testing. If you are interested in Gekko you could set it up in your system and let it run (without auto trading disabled for example), this would speed up the process by a lot!

Well usually big lag(or dos) at Mt.Gox means panic on all exchanges and the moment I see price drop and hi lag I sell(at BTC-e). Than I wait. Usually you see a big drop but then you will see also a bounce. If you are good enough to buy just before the bounce you are golden... So maybe lag can be a trigger to look for price drop and then you start looking for a bounce not just looking for lag getting smaller on Mt.Gox. This is what I saw happening... I know it is idiotic but that is what it is happening... My guess it that that way the price is manipulated. If you attack the biggest you need less money to change the price.

EDIT: I also looking for buy walls to figure out where the bounce will happen... You just must figure out which will hold.

The way Gekko is setup is that it implements trading methods. Right now it only knows about EMA. With the rules you are describing the best way to go would be to create a new trading method. Before we can go at this we do need all the rules clearly defined. I would have to give this idea some thought.

Hi,

I love Node.JS, and I will definitely give Gekko a try.
I'm mostly trading on Bitstamp, so a priority request for me would be bitstamp support.

I could easily write my own bot giving advice on current price trend, but what I would be struggling with is automated trading, I'm wondering how you would implement a situation like this (taking into account the capabilities of the bitstamp API):

https://www.bitstamp.net/api/

Every new interval depending on the interval size, my bot would look at the previous interval close and determine a buy, sell, hold signal. If my bot discovers a buy signal, I would want to buy at the close of the previous interval:

So I use the bitstamp API and fill in a BUY LIMIT ORDER at the price of the previous close (BITSTAMP doesn't support BUY MKT).

Now either, my order gets filled for the quantity I want, or there isn't enough available at that moment.

How would you deal with that? Only buy the quantity that is available at that price by first looking at the order book? Or buy more at a higher price? What would your threshold be?

PS:
I read you have no real trading experience and you are using the bot currently live, note that EMA is an extremely simple indicator and is most likely to not turn up a lot of profit.

Regards,

Thanks! Note that Gekko is at this moment in no way an advanced trading bot. I also would like bitstamp in there, but because of the problem you are describing and the fact that there is no NPM module for bitstamp at this moment (I would have to create my own, not hard at all but it takes some time).

I'm still figuring out a decent way to solve the problem you are describing (BTC-e has the same problem). I was thinking of determining the price based on the last trades and the way the trend is heading at what speed. But that would be pretty dangerous as Gekko is not only speculating what is going to happen but also at what price it should buy.

I think there will be a threshold that determines (when buying for example) a higher price (more sure to get filled but less profitable). I don't think there is historical data about the order book which makes backtesting not really possible (have to look into this per exchange). I also think Gekko should monitor the orders, if they don't get filled after x minutes it will re try at a different price. (It isn't even doing that right now).

I'm open to suggestions!

About the algo: EMAs popularity is caused by Goomboo. But Gekko is currently setup so that new trading methods could get implemented rather easily: Describe your trading method in Gekko's methods, receive a object which fetches trade data and emit an advice event when you want to buy or sell.

I'm open to suggestions, what method would you like to see in Gekko?
sr. member
Activity: 462
Merit: 250
Hi,

I love Node.JS, and I will definitely give Gekko a try.
I'm mostly trading on Bitstamp, so a priority request for me would be bitstamp support.

I could easily write my own bot giving advice on current price trend, but what I would be struggling with is automated trading, I'm wondering how you would implement a situation like this (taking into account the capabilities of the bitstamp API):

https://www.bitstamp.net/api/

Every new interval depending on the interval size, my bot would look at the previous interval close and determine a buy, sell, hold signal. If my bot discovers a buy signal, I would want to buy at the close of the previous interval:

So I use the bitstamp API and fill in a BUY LIMIT ORDER at the price of the previous close (BITSTAMP doesn't support BUY MKT).

Now either, my order gets filled for the quantity I want, or there isn't enough available at that moment.

How would you deal with that? Only buy the quantity that is available at that price by first looking at the order book? Or buy more at a higher price? What would your threshold be?

PS:
Your trading method is actually MACD.

Regards,
hero member
Activity: 826
Merit: 1000
Just a idea. Detect mtgox lag and sell when it is hi enough and buy when it is low enough + some time as a additional strategy. Of course not on a mtgox but on some other exchange...

So you mean when the lag at Mt. Gox is really high trade at other exchanges beacause Mt. Gox is lagging? Because what information can we get from knowing that the lag is really big? Also all the times Mt. Gox is not under stress the the lag is low.
Well usually big lag(or dos) at Mt.Gox means panic on all exchanges and the moment I see price drop and hi lag I sell(at BTC-e). Than I wait. Usually you see a big drop but then you will see also a bounce. If you are good enough to buy just before the bounce you are golden... So maybe lag can be a trigger to look for price drop and then you start looking for a bounce not just looking for lag getting smaller on Mt.Gox. This is what I saw happening... I know it is idiotic but that is what it is happening... My guess it that that way the price is manipulated. If you attack the biggest you need less money to change the price.

EDIT: I also looking for buy walls to figure out where the bounce will happen... You just must figure out which will hold.
sr. member
Activity: 287
Merit: 250
Would be cool if it could email me when a trend occurs, don't know if this is possible or not?

Been running it for a day now and nothing has been happening, just been holding, I guess its because the market is pretty stable at the moment  Undecided

Good idea, also would be really easy to implement. Added it to my list.

So maybe bitstamp?

Yep, it's on the list of exchanges I need to add!

Hi, I'm getting this error upon install:

Code:
...

Any idea?
Thanks

It is saying that `mtgox-apiv2` (a dependency of Gekko) needs a more recent version of nodejs. It needs a version above 0.10 and you have 0.6.19 installed.

Quick tip: you can install something like nvm to easiliy manage and install new versions of nodejs.

Just a idea. Detect mtgox lag and sell when it is hi enough and buy when it is low enough + some time as a additional strategy. Of course not on a mtgox but on some other exchange...

So you mean when the lag at Mt. Gox is really high trade at other exchanges beacause Mt. Gox is lagging? Because what information can we get from knowing that the lag is really big? Also all the times Mt. Gox is not under stress the the lag is low.
hero member
Activity: 826
Merit: 1000
Just a idea. Detect mtgox lag and sell when it is hi enough and buy when it is low enough + some time as a additional strategy. Of course not on a mtgox but on some other exchange...
newbie
Activity: 46
Merit: 0
Hi, I'm getting this error upon install:

Code:
info installOne [email protected]
verbose installOne cb [email protected]
ERR! Unsupported
ERR! Not compatible with your version of node/npm: [email protected]
ERR! Required: {"node":"~0.10"}
ERR! Actual:   {"npm":"1.1.4","node":"0.6.19"}
ERR!
ERR! System Linux 3.8.0-21-generic
ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
ERR! cwd /home/riccardo/gekko
ERR! node -v v0.6.19
ERR! npm -v 1.1.4
ERR! code ENOTSUP
ERR! message Unsupported
ERR! errno {}
verbose exit [ 1, true ]

Any idea?
Thanks
legendary
Activity: 1372
Merit: 1000
So maybe bitstamp?
full member
Activity: 224
Merit: 100
Orders in trade :

mtGOX          ~$5.5M
bitstamp        ~$1M
btc-e             ~$100K
campbx          ~$50K

hehe... Undecided
 

Won't mean much if I'm effectively blocked from using MtGox if the lawsuit goes badly for them or if more than just the DHS seizure of their account at Dwolla happens.

As it is I'm not willing to take that risk any more.  I'll trade elsewhere, thank you.

And I'm glad you are looking to make what the source of the ticker is configurable, whydifficult.  Smiley
newbie
Activity: 17
Merit: 0
Would be cool if it could email me when a trend occurs, don't know if this is possible or not?

Been running it for a day now and nothing has been happening, just been holding, I guess its because the market is pretty stable at the moment  Undecided
legendary
Activity: 1372
Merit: 1000
I'd be more interested in this if it could track the price on the same exchange as the one being traded on.  Personal choice is to not have anything to do with MtGox, so anything that can work strictly with CampBX, or BTC-e, would be best.

Every day I'm getting the feeling more and more people feel the same way. Gekko currently does not support this but will in the future, stay tuned!

Orders in trade :

mtGOX          ~$5.5M
bitstamp        ~$1M
btc-e             ~$100K
campbx          ~$50K

hehe... Undecided
 
sr. member
Activity: 287
Merit: 250
I'd be more interested in this if it could track the price on the same exchange as the one being traded on.  Personal choice is to not have anything to do with MtGox, so anything that can work strictly with CampBX, or BTC-e, would be best.

Every day I'm getting the feeling more and more people feel the same way. Gekko currently does not support this but will in the future, stay tuned!
full member
Activity: 224
Merit: 100
I'd be more interested in this if it could track the price on the same exchange as the one being traded on.  Personal choice is to not have anything to do with MtGox, so anything that can work strictly with CampBX, or BTC-e, would be best.
sr. member
Activity: 287
Merit: 250
No. Think of it like sqlite, there is no 3rd party dependency other than the Node.js library. LevelDB is database created by Google by the way. Levelup is the Node.js implementation.

-JP

Sorry misread your first message, levelDB looks way better then trying to implement flatfile really bad myself. Storing trade history is on my todo list and I think I will use levelDB for it. Thanks for the tip!

Thank you for your bot. Do you think to add other altcoin trading?
I think it would be great to have LTC/USD with BTC-E.

Thanks!

Currently Gekko is basing all his advice on what is happening at Mt. Gox (even when you have automatic trading set at BTC-e, because for BTC every exchange will follow the trends happening at Mt. Gox). I'm planning a new feature where you can configure on what exchange (and what currency) to watch for trends Smiley

Note that other features (mostly backtesting) are higher on my todo list at the moment.

askmike is the man! Keep up the good work dude!

Haha thanks man!
newbie
Activity: 18
Merit: 0
askmike is the man! Keep up the good work dude!
member
Activity: 72
Merit: 10
Thank you for your bot. Do you think to add other altcoin trading?
I think it would be great to have LTC/USD with BTC-E.
jp
member
Activity: 69
Merit: 10
Quote
But isn't leveldb the same kind of dependency?

No. Think of it like sqlite, there is no 3rd party dependency other than the Node.js library. LevelDB is database created by Google by the way. Levelup is the Node.js implementation.

-JP
sr. member
Activity: 287
Merit: 250
Strong order - you make order to sell/buy which point price of deal
market price - you make order to sell/buy and stock execute it on current market price ( as made in TobbeLino's bot)

The names can be wrong, but the description correct imho.  

Ow that I understand Smiley

BTC-e doesn't let me do a 'market price', I have to state at which price I want to place an order. When you have enabled auto trading and Gekko identifies a trend a couple of things will happen:

  • If you configured Mt. Gox -> buy/sell at 'market price'
  • If you configured BTC-e -> look at all the BTC-e trades in the last 20 seconds and calculate average price, now buy sell with this price.

This is just a workaround to first grab the latest price and use that. Do you suggest a special strategy for 'strong orders'? Because right now Gekko will never do a strong order on Mt. Gox because it can do a market price. I can make it configurable so that Mt. Gox will also have a 'strong order' option, but what price should Gekko use or how should it calculate a price?
legendary
Activity: 1372
Merit: 1000
Strong order - you make order to sell/buy which point price of deal
market price - you make order to sell/buy and stock execute it on current market price ( as made in TobbeLino's bot)

The names can be wrong, but the description correct imho. 
sr. member
Activity: 287
Merit: 250
Gekko is being actively developed at the moment Smiley

Gekko now reports the profit it generates or would have generated (wether you have real trading enabled or not)! Gekko always simulates trading based on the EMA advice and reports about it every interval.

Sorry my bad english.
I mean this:
mtGOX API allow two trading strategies (market price / strong order )
BTCe - only strong order

This two strategies have different trading algorithms.
as first one method is realized and second have to be - maybe for GOX it should be switchable, as giving different trading results?

More - I was unable to find a document which describes stock strategy on strong orders. If I make order to sell at $1 and stock have order to bye on $1.1, which order will be executed if any will?  It's most interesting point.

Also I offer all settings should be stored as the options of stock and trading method. Other, we (users) will spend all the experiments time for change settings and try .

I don't quite understand it yet, because I can't find what you mean by strong order / market price strategy (I know very little about trading, I learned last week what a order book is for example). If you can point me to some links I will research it and try to put it into Gekko Smiley

Upcoming features

  • Backtesting different EMA settings
  • More exchanges
legendary
Activity: 1372
Merit: 1000
Sorry my bad english.
I mean this:
mtGOX API allow two trading strategies (market price / strong order )
BTCe - only strong order

This two strategies have different trading algorithms.
as first one method is realized and second have to be - maybe for GOX it should be switchable, as giving different trading results?

More - I was unable to find a document which describes stock strategy on strong orders. If I make order to sell at $1 and stock have order to bye on $1.1, which order will be executed if any will?  It's most interesting point.

Also I offer all settings should be stored as the options of stock and trading method. Other, we (users) will spend all the experiments time for change settings and try .   



 
 
Pages:
Jump to: