diff --git a/freqtrade/data/converter/orderflow.py b/freqtrade/data/converter/orderflow.py index bd07c105e..29303b944 100644 --- a/freqtrade/data/converter/orderflow.py +++ b/freqtrade/data/converter/orderflow.py @@ -208,6 +208,7 @@ def trades_orderflow_to_imbalances(df: pd.DataFrame, imbalance_ratio: int, imbal :return: dataframe with bid and ask imbalance """ bid = df.bid + # compares bid and ask diagonally ask = df.ask.shift(-1) bid_imbalance = (bid / ask) > (imbalance_ratio) # overwrite bid_imbalance with False if volume is not big enough