def _on_step(self) -> bool:
if self.is_pruned:
return False
-
- if self.eval_freq > 0 and self.n_calls % self.eval_freq == 0:
- super()._on_step()
+ _super_on_step = super()._on_step()
+ if _super_on_step and self.eval_freq > 0 and self.n_calls % self.eval_freq == 0:
self.eval_idx += 1
last_mean_reward = getattr(self, "last_mean_reward", np.nan)
if not isinstance(last_mean_reward, (int, float)) or not np.isfinite(
"&s-minima_threshold": -2,
"&s-maxima_threshold": 2,
"label_period_candles": 24,
- "label_natr_ratio": 6.0,
+ "label_natr_ratio": 7.5,
"hp_rmse": -1,
"train_rmse": -1
},
"label_period_candles", 24
),
"label_natr_ratio": float(
- self.ft_params.get("label_natr_ratio", 6.0)
+ self.ft_params.get("label_natr_ratio", 7.5)
),
}
)
),
"label_natr_ratio": float(
self.freqai_info["feature_parameters"].get(
- "label_natr_ratio", 6.0
+ "label_natr_ratio", 7.5
)
),
}
if label_natr_ratio and isinstance(label_natr_ratio, float):
return label_natr_ratio
return float(
- self.freqai_info["feature_parameters"].get("label_natr_ratio", 6.0)
+ self.freqai_info["feature_parameters"].get("label_natr_ratio", 7.5)
)
def set_label_natr_ratio(self, pair: str, label_natr_ratio: float) -> None:
def zigzag(
df: pd.DataFrame,
natr_period: int = 14,
- natr_ratio: float = 6.0,
+ natr_ratio: float = 7.5,
) -> tuple[list[int], list[float], list[TrendDirection], list[float]]:
n = len(df)
if df.empty or n < natr_period: