From 07034ed7a6a3eaf58d05a37cc66ef9b2990f3a8f Mon Sep 17 00:00:00 2001 From: Joe Schr <8218910+TheJoeSchr@users.noreply.github.com> Date: Tue, 28 May 2024 20:22:26 +0200 Subject: [PATCH] orderflow: add comment with insight about imbalances --- freqtrade/data/converter/orderflow.py | 1 + 1 file changed, 1 insertion(+) 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