freqtrade / technical

Various indicators developed or collected for the Freqtrade
GNU General Public License v3.0
776 stars 218 forks source link

implementation of fibonacci in freqtrade #178

Open DzivaMusande opened 3 years ago

DzivaMusande commented 3 years ago

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

xmatthias commented 3 years ago

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.

evo11x commented 2 years ago

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?

xmatthias commented 2 years ago

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.

evo11x commented 2 years ago

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.

xmatthias commented 2 years ago

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

evo11x commented 2 years ago

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

xmatthias commented 2 years ago

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.

evo11x commented 2 years ago

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

xmatthias commented 2 years ago

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