Post
Topic
Board Trading Discussion
Re: Gekko - a javascript trading bot for nodejs
by
whydifficult
on 16/08/2013, 21:11:12 UTC

Hi, thanks for taking the time to reply! Let's see if I'm getting everything right. When you say "a different history" you mean to say that when I change the number of candles to retain for calculation, I'm basically evaluating a different timeframe = different history, correct?

On another note, I was looking through the source code to see if I could write a tester that would automatically find the optimum EMA values for a given timeframe, but I haven't had much time to do so.

the number of candles means two things right now:

- the amount of candles to grab from before `now` to base the EMA history on.
- the amount of candles at any time to keep in memory (this doesn't have to be here at all since you only need the last once you started).

So it influences how pure the EMA calculation will be based on the grabbed history. But because the EMA is recalculated every interval, after running Gekko for a long time this difference will be almost gone. This is also where things are currently broken in Bitstamp & BTC-e: the APIs have changed on how to get older trades.



Thanks a million for your answer.

I am trying with really small ema (1/4) periods and 720 minutes but i only manage to get it a really small number of candles With only one it gives an error. With two it just stays there waiting for 12 hours until it gets the minimum to calculate an ema crossover then gives you an advice. With 3 it just says that it could not download the historical data. I have tried also with the standard values but still it gives the failed to load historical trades from bitstamp error.

Thanks again,

That's a pretty big interval, if you set the amount of candles to 100 Gekko would need to fetch all trades from the last 12 hours * 100. It can't ask for candles so it needs to fetch all those trades and calculate the candles. You could try to turn on debug in the config to get more information on what works and what doesn't. The only other option you have left is Mt. Gox right now.

Note that the new website I am building offers a solution this problem by offering candles (very light weight) instead of all the trades needed to calculate those candles.