freqtrade/technical

implementation of fibonacci in freqtrade

DzivaMusande opened this issue · 9 comments

HI Guys
1st thanks for creating such an amazing trading tool Freqtrade and the associated and important repositories. Im new to the game, and have only got into freqtrade and crypto in the past 12months and have learnt a looooot. so thank you.
i've the following request
i'm a fan of fibonacci retracement and it's been working for me very well in this current bull market esp in combination with RSI. i'm now looking at automating my setup. but i cant seem to find how i can do this from the material on freqtrade.
i want to do a rolling auto fibonacci with a 30day look back and the trade entry would be at 50% or 61.8% tretracement and RSI <30
exit is based on RSI over bought (i can do this part :))
thanking you in advance
best regards
Connor

well technical (this module) does provide a fibonacci_retracements() method.

I've not used that myself though.
by the (quick) looks of it - you'll need to be careful as it seems to be using the full history - which means it will have a lookahead bias in backtesting.

But what about the live candles? From what I know freqtrade returns only the last 200 or 400 candlesticks in live mode, is there a way to get more than 200 in live mode? So the strategy can lookback more days on a 5min candlestick?

The exact number of candlesticks varies by exchange - but it's usually around 1000 for most supported exchanges.

the really available amount can also be changed (within reason) by startup_candle_count.

Thanks, but 1000 x 5min = 3.4 days, still not enough for fibonacci or trend lines, to convert to 1h..4h and also apply indicators on that.

Also it is not a good idea to read 500-1000 candles at every cycle, it may trigger a rate limit on the exchange for too many requests.

The best solution would be to have the entire selected candle history in memory and just append the new ones, this would also speed up the the reading cycles and can be combined with batch reading of multiple assets which in turn will leave room for more order requests.

1000 candles is usually one request.
If you need longer data, best use informative pairs.

I know it's one request, but it slows down the bot cycle speed.
what you mean informative pairs?

you're wrong in thinking that 1 request for 1 candle + combining the data reliably (!) is faster than getting 1 request. the slow part is the request - which is always 1. This is however not the place to discuss this - therefore i consider this topic concluded.

Please refer to the documentation if you don't understand something. We try to have most possibilities listed there.

It is not specified in the documentation how can I have longer than 1000 candles in live mode with informative pairs

You can use a longer timeframe - which will still give you 1000 candles, but can look back multiple years (assuming 1d candles).