| _Reversal confirmation_ | | | |
| reversal_confirmation.lookback_period | 0 | int >= 0 | Prior confirming candles; 0 = none. |
| reversal_confirmation.decay_ratio | 0.5 | float (0,1] | Geometric per-candle relaxation factor. |
-| reversal_confirmation.min_natr_ratio_percent | 0.009 | float [0,1] | Lower bound fraction for volatility adjusted reversal threshold. |
+| reversal_confirmation.min_natr_ratio_percent | 0.0099 | float [0,1] | Lower bound fraction for volatility adjusted reversal threshold. |
| reversal_confirmation.max_natr_ratio_percent | 0.035 | float [0,1] | Upper bound fraction (>= lower bound) for volatility adjusted reversal threshold. |
| _Regressor model_ | | | |
| freqai.regressor | `xgboost` | enum {`xgboost`,`lightgbm`} | Machine learning regressor algorithm. |
default_reversal_confirmation: dict[str, int | float] = {
"lookback_period": 0,
"decay_ratio": 0.5,
- "min_natr_ratio_percent": 0.009,
+ "min_natr_ratio_percent": 0.0099,
"max_natr_ratio_percent": 0.035,
}
return False
if order not in {"entry", "exit"}:
return False
-
trade_direction = side
+ if (
+ min_natr_ratio_percent < 0.0
+ or max_natr_ratio_percent < min_natr_ratio_percent
+ ):
+ logger.warning(
+ f"User denied {trade_direction} {order} for {pair}: invalid natr_ratio_percent range "
+ f"min={format_number(min_natr_ratio_percent)}, max={format_number(max_natr_ratio_percent)}"
+ )
+ return False
if not isinstance(lookback_period, int):
logger.info(