gekko icon indicating copy to clipboard operation
gekko copied to clipboard

CandleSize less than minute

Open sad8c opened this issue 9 years ago • 5 comments

Can somebody advice me, how can i make candleSize less than a minute? Maybe 30 seconds or even 10 seconds. Is it possible to make some changes in candleCreator or candleBatcher files for this case?

sad8c avatar Feb 24 '17 15:02 sad8c

I've already changed a heartbeat ih heart.js to 5 seconds (for bitfinex), Also i need to make candles less than a minute...

sad8c avatar Feb 24 '17 15:02 sad8c

Unfortunately this is currently not possible within Gekko.. If you want to deal with a lower resolution you probably want to use websockets over polling (because polling becomes to slow) and have a different strategy for storing historical data. To keep Gekko simpler I made the choice the minimum candle time to 1 minute.

I am locking this for now as this is not within Gekkos scope. But please reply and let me know how you would use gekko that would work up to the 1 second level.

askmike avatar Feb 26 '17 15:02 askmike

@askmike , Thank you for your answer. I've found that i can use tradeBatcher for my own advising speed. But i have only one question. How can i init advice method from tradeBatcher correctly. I don't need candles functionality already, i need only init advice from tradeBatcher....

sad8c avatar Feb 27 '17 12:02 sad8c

If you want to do that you need to hack gekko a bit to suit your needs, gekko currently works:

  • it hooks up an exchange to the tradebatcher to a candlecreater. The last one is exposed in a "market".
  • Your strategy (trading method) code expects candles and is wrapped into a gekkoStream.

architecture

If you want to take the candles out and act directly on trades you need to hack a bunch of things:

  • the market, the stream, and the gekkoStream all assume only candles.
  • the code that integrates your strategy (and exposes indicators) only deals with candles.

I guess the easiest would be to move away from the full Gekko architecture and directly hook up the tradebatcher to your code that executes your strat and quickly creates some candles so you can use indicators (if you want too).

askmike avatar Feb 27 '17 12:02 askmike

@askmike Can we chat by skype and maybe you can help for payment? My skype: kotov.altmedia

sad8c avatar Feb 27 '17 12:02 sad8c