From: Jérôme Benoit Date: Sat, 13 Dec 2025 21:41:14 +0000 (+0100) Subject: docs: add code comment X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=629b625ce23e4fe4e6851bb52e077e2f69923208;p=freqai-strategies.git docs: add code comment Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index f0e6052..bcd8ece 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -860,13 +860,16 @@ def compute_extrema_weights( if len(indices) == 0 or strategy == WEIGHT_STRATEGIES[0]: # "none" return pd.Series(DEFAULT_EXTREMA_WEIGHT, index=extrema.index) - if strategy in { - WEIGHT_STRATEGIES[1], - WEIGHT_STRATEGIES[2], - WEIGHT_STRATEGIES[3], - WEIGHT_STRATEGIES[4], - WEIGHT_STRATEGIES[5], - }: + if ( + strategy + in { + WEIGHT_STRATEGIES[1], + WEIGHT_STRATEGIES[2], + WEIGHT_STRATEGIES[3], + WEIGHT_STRATEGIES[4], + WEIGHT_STRATEGIES[5], + } + ): # "amplitude" / "amplitude_threshold_ratio" / "volume" / "speed" / "efficiency_ratio" if strategy == WEIGHT_STRATEGIES[1]: # "amplitude" weights = np.asarray(amplitudes, dtype=float) elif strategy == WEIGHT_STRATEGIES[2]: # "amplitude_threshold_ratio"