askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.07k stars 3.94k forks source link

Back Test Entry and Exit Points not accurately matching with Exchange #1785

Closed bvanhou closed 6 years ago

bvanhou commented 6 years ago

Note: for support questions, please join our Discord server

greenbigfrog commented 6 years ago

What is your configuration? And also gekko can't predict the future, but act on indicators

bvanhou commented 6 years ago

The configuration is out of the box and utilizing an MFI strategy I put together. The logic is simple however, the entry and exit points are delayed.

This is like this on every strategy, even the out of the box ones.

  if(this.mfi <= this.settings.oversold){
    log.debug('OverSold | In buy trend');    
    this.advice('long');
    console.log('buyy');
    console.log(candle.start.toDate());
  } else if(this.mfi >= this.settings.overbought){
    console.log('sellllll ');
    console.log(candle.start.toDate());

    log.debug('OverBought | In sell trend');
    this.advice('short');
  }else{
    log.debug('In no trend');    
    this.advice();   
  }

Entry Point from Trade View:

screen shot 2018-01-26 at 8 14 02 pm

BackTest Results

screen shot 2018-01-26 at 8 20 09 pm

What should be the Exit Point from Trade View:

screen shot 2018-01-26 at 8 22 24 pm
bvanhou commented 6 years ago

It seems the candle data from the importer in binance is some how different than looking at tradeview.

I have checked the timezone and currency and everything. The entrypoints do not make sense to me.

Can anyone help clarify the entrypoints?

PanoPilot commented 6 years ago

Hi there, I've similiar issues with GDAX. Have you checked that the candle.close price from the trade is actually matching with the prices directly at the exchange at that point of time and have you checked that candle.start is matching to the actual time. I've noticed that the candle.close market time is 1.5h earlier than the real time, at least in my case.

thx & best, chris

thisisloze commented 6 years ago

I have the same problem with EVERY exchange. Gekko's inaccuracy is off by so much its impossible to work with :/

askmike commented 6 years ago

I have the same problem with EVERY exchange. Gekko's inaccuracy is off by so much its impossible to work with :/

Thanks for your constructive feedback with detailed information. A lot of people are using Gekko successfully without any issue.


Keep in mind that Gekko creates candles based on start time, it doesn't round to clock times (if you have hourly candles and Gekko starts at :35 the candles might start at :35 every hour).

@bvanhou @PanoPilot are you guys experiencing this with the paper trader (including backtests) or live trader?

thisisloze commented 6 years ago

You built the thing didn't you? Well heres a bit more information. Take ANY timeframe on trading view. Then put a simple sma fast and sma slow on it. Look at the cross overs. ( do a small time frame of a day ) count how many times sma goes above the slow sma. Then do it on gekko. And notice the inaccuracy. Try it for 5 exchanges. Notice them all being inaccurate. If you want more information I can provide it. But I'm sure you already know all this its your baby. I have tried 8 exchanges with 8 days of information. All of them inaccurate. Price. Volume. Time. Everything. Which causes the sma crossovers to be wrong. So what more information do you need?

thisisloze commented 6 years ago

Lots of people using it without issues? Can you point me in the direction of one ?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.