mirror of
https://github.com/PyP-Quant/quant-trading-strategy-templates.git
synced 2026-08-23 15:48:05 +00:00
tune xauusd atr breakout defaults
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"}}
|
||||
|
||||
Reference in New Issue
Block a user