Gekko Forum
Gekko needs ticks - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: Technical Discussion (https://forum.gekko.wizb.it/forum-23.html)
+--- Thread: Gekko needs ticks (/thread-56828.html)



Gekko needs ticks - richard - 04-18-2018

Aloha,

I think Gekko is pretty cool.  But it's missing something very important.

Access to trades.

Gekko gets data from the live market and builds candlesticks which it passes to your strategy.  Your strategy, as far as I can tell, has no access to current trades and prices.  Only when a candlestick is completed does price information get passed on.  Once for each candle.

Most strategies use various sorts of indicator crossings to make buy and sell decisions.  Candlesticks don't let you see exactly when a line crossing occurs.  They're always late.  That's why real-time charts have a moving marker for the current trade at the right edge.  So you know when to get in and out of trades.

Gekko doesn't have this very important information.

With 15-minute candles your entries and exits can be as much as 15 minutes off!  Even 1-minute candles are at a substantial disadvantage.

As others have noted, stop losses can hardly work under this system.  You are most likely to get really long candles when a trade is going against you.  So waiting for a candle to complete before testing for a stop is likely to be very costly.  This is why Gekko strategies with long time-frame candles get some pretty terrible losing trades.

You simply can't make decent entries and exits without watching every trade.

I've written trading bots and charting systems.  They both have always had full access to the trade stream.  Candles are nice to display, but I don't think I've ever used them for anything else.  You build them in the chart, not before.  They're just for looking at.

Gekko is at a substantial and costly disadvantage without access to the trade stream.


Richard


RE: Gekko needs ticks - ankasem - 04-18-2018

@ drahcir
how many scripts have you written. give a few examples. we benefited from your experiences   Huh


RE: Gekko needs ticks - askmike - 04-18-2018

In my opinion realtime market data is only important when you are looking at small timeframes and doing anything related to micro market structures. If you build a strategy around a weekly or monthly trend in a market you really don't care about all trades and orderbook ticks happening every second.


RE: Gekko needs ticks - Gryphon - 04-18-2018

I agree that running a strat on a timeframe of more than a few minutes misses information. To get past it as much as possible I run strategies in gekko at M1 timeframes, and manually update the indicators at the desired timeframe within that. I then run simpler take profit strategies for quicker movements.

Something I'm experimenting with is creating an array of indicators, of the length of the desired timeframe. Each minute candle, the next indicator in the array gets updated. Say I want a 10 minute RSI. I have ten RSI indicators, and update the next one each minute on a loop, so every minute I have the result of the indicator over the timeframe I want... I've yet to graph out and see if I'm actually getting anything close to what I hope I'm getting though!


RE: Gekko needs ticks - richard - 04-18-2018

(04-18-2018, 02:31 PM)askmike Wrote: In my opinion realtime market data is only important when you are looking at small timeframes and doing anything related to micro market structures. If you build a strategy around a weekly or monthly trend in a market you really don't care about all trades and orderbook ticks happening every second.

You should always care about entries and exits.  The purpose here is to succeed, to make money.  Taking every advantage isn't just natural, its a necessity.

Why does the paper trader have a 'slippage' setting if not to approximate slight losses in entries and exits.  That slippage is microscopic compared to this problem.

Ignoring entry levels chosen  by your strategy, or making them random within the span of a multi-minute or hour candlestick price range is a mistake of the highest order.

The only sane way to trade the equivalent of a ten-minute candlestick chart with Gekko is to set it to 1-minute candles and set indicator inputs (MAs, etc.) to ten times the ten-minute settings.  (This is just an approximation.)

But while your entries and exits with 1-minute candles will be better, they'll often still be pretty terrible.  Price can move pretty far in a minute.

Strategies generate buy and sell signals at specific price levels, not wild approximations.  Gekko will sometimes give you better than expected fills, true.  And other times really bad ones.  Mostly it's random.  This makes a shambles of back trading results.  Hours of adjustment essentially wasted.

So the answer is to feed trades (ticks) to your charts and strategies.  It's the only thing that makes sense.  It makes drawing charts and running strategies more complex, but that's life.  If you want to compete well you can't give up any advantages.

I'm sorry to be the one to point this out to you.  I like the system you've built.  It would be pretty cool to trade with.  But it's currently not usable.  It has a fatal flaw.  I know this will require a fair amount of rewriting.  But I don't think it's quite as bad as it may seem at first blush.  And it may cause other cool things to happen along the way.

Thanks,
Richard


RE: Gekko needs ticks - susitronix - 05-04-2018

(04-18-2018, 02:47 PM)Gryphon Wrote: I agree that running a strat on a timeframe of more than a few minutes misses information. To get past it as much as possible I run strategies in gekko at M1 timeframes, and manually update the indicators at the desired timeframe within that. I then run simpler take profit strategies for quicker movements.

Something I'm experimenting with is creating an array of indicators, of the length of the desired timeframe. Each minute candle, the next indicator in the array gets updated. Say I want a 10 minute RSI. I have ten RSI indicators, and update the next one each minute on a loop, so every minute I have the result of the indicator over the timeframe I want... I've yet to graph out and see if I'm actually getting anything close to what I hope I'm getting though!

Hey thats an intresting idea. Never thought about this. thats smart

Thumbs up! thanks
But would it be necessary to also create arrays for the 10min candles, for each RSI?


RE: Gekko needs ticks - Gryphon - 05-05-2018

(05-04-2018, 07:35 PM)susitronix Wrote: Hey thats an intresting idea. Never thought about this. thats smart

Thumbs up! thanks
But would it be necessary to also create arrays for the 10min candles, for each RSI?

It depends on the indicator, rsi just uses the close price, so the close of every tenth 1 min candle is the same as the close of the 10 minute candles.

Indicators which require open, high, low, volume etc would need candles built up for them... I've been away so haven't had any more chance to experiment, let me know if you have any success!