tune xauusd atr breakout defaults

This commit is contained in:
root
2026-04-06 13:12:14 +00:00
parent 61a0d5b596
commit 27382576ea
3 changed files with 11 additions and 4 deletions
+7
View File
@@ -3,3 +3,10 @@
Custom Python breakout baseline for XAUUSD.
This project avoids ML on purpose. It is useful as a transparent baseline to compare against heavier gold models like XGBoost or LightGBM.
The default gate is intentionally responsive so PPE produces more events than a strict long-range breakout filter:
- `breakout_window`: `12`
- `atr_mult`: `0.05`
If it overtrades, raise `atr_mult` first. If it is still too quiet, shorten `breakout_window`.
@@ -7,8 +7,8 @@
"parameters": {
"lookback": 64,
"atr_window": 14,
"breakout_window": 24,
"atr_mult": 0.25
"breakout_window": 12,
"atr_mult": 0.05
},
"training_requirements": [
"numpy",
+2 -2
View File
@@ -24,8 +24,8 @@ def predict(model, market_data, config):
params = {**model.get("params", {}), **config.get("parameters", {})}
lookback = int(params.get("lookback", 64))
atr_window = int(params.get("atr_window", 14))
breakout_window = int(params.get("breakout_window", 24))
atr_mult = float(params.get("atr_mult", 0.25))
breakout_window = int(params.get("breakout_window", 12))
atr_mult = float(params.get("atr_mult", 0.05))
candles = market_data.get("candles", [])
if len(candles) < lookback:
return {"signal": "HOLD", "confidence": 0.0, "metadata": {"reason": "not_enough_candles"}}