Strategy 250 XAUUSD - Composite Quality Score by Fran_Pineda

By Fran_Pineda

Performance Metrics

Description

**Strategy 250 XAUUSD – Composite Quality Score v2**Strategy 250 is a trend-continuation breakout system designed for **XAUUSD on the 1H timeframe**.The strategy uses a **Composite Quality Score** to evaluate whether a Donchian breakout has enough structural quality to justify an entry. Instead of entering every breakout, it filters signals by combining positive confirmation factors with negative market-structure penalties.### Core LogicThe strategy looks for breakouts above or below a previous Donchian range:* **Long entry:** price closes above the previous Donchian High.* **Short entry:** price closes below the previous Donchian Low.* The breakout is only accepted if the final quality score is above the minimum threshold.* EMA200 slope must confirm direction: * Positive slope for long trades. * Negative slope for short trades.### Composite Quality ScoreThe score is built from two main groups:### AmplifiersThese are factors that improve the quality of the setup:1. **EMA200 Slope** Measures whether the macro trend is aligned with the breakout.2. **Macro Mid-Bias** Evaluates where price is located inside a wider historical range.3. **EMA200 Distance in ATR** Measures how far price is from the EMA200 using ATR as normalization.### PenaltiesThese are factors that reduce the quality of the setup:1. **Acceptance Penalty** Penalizes breakouts where price has spent too much time near the breakout zone, reducing the surprise factor.2. **Sweep Penalty** Penalizes setups where recent liquidity sweeps suggest poorer breakout quality.3. **Range Position Penalty** Penalizes breakouts that originate from a weak position inside the prior range.### ExitsPositions are closed when:* Price breaks the opposite Donchian boundary.* The maximum holding period is reached.### Recommended Market* Symbol: **XAUUSD*** Timeframe: **1H*** Market type: Gold / CFD / Spot Gold depending on broker feed.### Optimized Parameters Used* Donchian Period: `50`* Macro Bias Period: `600`* EMA200 Slope Period: `30`* Acceptance Lookback: `20`* Sweep Lookback: `20`* Minimum Quality Score: `0.8`* Maximum Hold Bars: `80`### NotesThis strategy is not a simple breakout system. It is designed to avoid low-quality breakouts by penalizing conditions historically associated with weaker performance in XAUUSD.As always, results may vary depending on broker data, spread, commissions, and execution quality. This script is intended for research, testing, and educational purposes only.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView