OPEN-SOURCE SCRIPT
XAU Seasonality + Setup Quality + Month Strength | WarRoomXYZ

XAU Seasonality Engine is a technical analysis indicator developed for the study of recurring, calendar-based behavior on XAUUSD (Gold).
The tool blends month-of-year seasonality statistics with higher-timeframe context and a setup-quality gate to help users observe when market conditions historically lean strong, weak, or neutral — and how strict trade selection should be during each regime.
Indicator Concept
An indicator for XAUUSD that combines:
1. Seasonality Regime (Month-of-Year Bias)
► Classifies the current month as Strong / Weak / Neutral based on either:
• Preset months (user-defined)
or
• Auto mode (computed from historical monthly performance)
► Strong months suggest a bullish tailwind (not a signal).
► Weak months suggest headwind / caution and require stricter setup quality.
2. Monthly Performance Engine (Under the Hood)
► Uses the symbol’s monthly timeframe data to compute, per calendar month:
• Average monthly return (%)
• Win rate (%) — how often that month closes positive
• Month Strength Score (0–100) — a blended score derived from performance data
► The score is designed to provide a relative strength snapshot of seasonality by month.
3. Month Strength Histogram
► Plots a histogram (0–100) of the current month’s strength score.
• Higher bars = historically stronger month tendency
• Lower bars = historically weaker month tendency
► Optional horizontal reference lines mark “strong” and “weak” zones to make regimes obvious at a glance.
4. Setup Quality Meter (Confluence Filter)
► The indicator calculates a Setup Quality Score (0–100) using market structure and momentum components, such as:
• EMA trend alignment
• Momentum confirmation (EMA fast vs slow)
• Structure break confirmation (BOS)
• Liquidity sweep behavior
• Candle confirmation logic
► This score is intended as a trade-selectivity filter, not a trade executor.
5. Adaptive Rules for Weak Months (Strict Mode)
► When the indicator detects a weak seasonal regime, conditions automatically tighten:
• The A+ threshold increases (adaptive thresholding)
• Optional rule: Weak months require BOS + Sweep + FVG simultaneously before any A+ condition is considered valid
This forces the user into “higher-quality-only” behavior during historically weaker seasonal periods.
🔹1 Visual Components Included
• Seasonality regime label (Strong / Weak / Neutral)
• Optional background shading based on regime
• Month Strength Score histogram (0–100)
• Current month stats: Avg return + win rate
• Setup Quality Meter value (0–100)
• Adaptive A+ threshold display
• Weak-month confluence gate status (BOS / Sweep / FVG pass/fail)
• Optional alerts when strict criteria are met
➣What [Win Rate] Means in the XAU Indicator
🔹 Definition (in THIS indicator)
Win Rate = the percentage of historical months that closed positive for the same calendar month.
It is NOT:
trade win rate ❌
signal accuracy ❌
It is a statistical seasonality metric.
How It’s Calculated
For each calendar month (January, February, etc.), the indicator:
1.Looks at historical monthly candles (Monthly timeframe).
2. Counts how many times that month:
•Closed higher than it opened (or higher than previous month close).
3. Divides:
Number of positive months
÷
Total number of observed months
× 100
Example: September
If over the last 20 years:
September closed green 14 times
September closed red 6 times
Then:
Win Rate = (14 / 20) × 100 = 70%
That’s what you see as [Win Rate] in the dashboard.
What the Win Rate Is Used For
1️⃣ Part of the Month Strength Score
The indicator blends:
•Average Monthly Return (%) → measures magnitude
•Win Rate (%) → measures consistency
Combined into:
Month Strength Score (0–100)
This avoids a common trap:
•A month with 1 huge rally but many losses ≠ reliable
•A month with steady positive closes = higher quality environment
What Win Rate Tells You
High Win Rate (e.g. 65–75%)
•Gold more often closes higher in this month
•Continuation is statistically more likely
•Pullbacks are more likely to resolve in trend direction
Low Win Rate (e.g. 35–45%)
•Gold more often fails to close higher
•More chop, deeper retracements, false breakouts
•Continuation trades statistically struggle
What It Does NOT Tell You
🚫 It does NOT mean:
•“You will win 70% of your trades”
•“Every setup in this month works”
•“Direction is guaranteed”
Seasonality is context, not prediction.
Why This Is Powerful When Combined With Your System
On its own, win rate is just data.
But in your indicator, it’s used to:
•🔒 Raise the A+ threshold in weak months
•🧠 Force BOS + Sweep + FVG confluence
•❌ Block marginal setups automatically
So instead of guessing:
-“Why is gold so choppy this month?”
You know:
-“This month historically underperforms SO I must be stricter.”
➣What [Avg Monthly Return] Means in the XAU Seasonality Indicator
🔹 Definition (in THIS indicator)
Avg Monthly Return = the average percentage gain or loss of XAUUSD for a specific calendar month, calculated across many years.
It measures magnitude, not frequency.
It is NOT:
•trade profit ❌
•expected return for the next month ❌
•guaranteed performance ❌
It is a historical seasonality tendency.
How It’s Calculated
For each calendar month (January, February, etc.), the indicator:
1.Takes every historical occurrence of that month.
2.Calculates the percentage change of the monthly candle:
(Monthly Close − Previous Monthly Close)
÷ Previous Monthly Close × 100
3. Adds all those percentage changes together.
4. Divides by the total number of observations.
Example: September
Assume over 20 years:
+2.4%, +1.1%, −0.6%, +3.0%, +1.8%, ...
If the sum of all September returns = +28% across 20 years:
Avg Monthly Return = +1.40%
That’s the number displayed in the indicator.
What Avg Monthly Return Is Used For
1️⃣ Measuring Strength of Movement
•Win Rate → “How often does it close green?”
•Avg Monthly Return → “How big are the moves when it works?”
Both are needed.
A month can:
•Win often but move very little
•Move a lot but only occasionally
The indicator combines both to avoid misleading conclusions.
How to Interpret Avg Monthly Return
Positive Avg Return (e.g. +0.8% to +2.0%)
•Gold tends to expand during this month
•Continuation phases are more likely
•Pullbacks are often absorbed
Near-Zero Avg Return (e.g. −0.2% to +0.2%)
•Market is statistically balanced
•Expect chop, rotations, false breaks
•Continuation is less reliable
Negative Avg Return (e.g. −0.5% or worse)
•Downward pressure or heavy mean reversion
•Rallies often fade
•Risk of aggressive stop hunts
What Avg Monthly Return Does NOT Mean
🚫 It does NOT mean:
•“Price will move +1.4% this month”
•“You should buy because the number is positive”
•“This is a guaranteed edge”
It describes historical behavior, not future certainty.
Why Avg Monthly Return Matters More Than People Think
Two months can have the same win rate but behave very differently:
Example:
Month Win Rate Avg Return Reality
Month A 65% +0.2% Small, choppy wins
Month B 55% +1.6% Fewer wins, but strong expansions
Your indicator would rank Month B as stronger, which is correct for continuation-based strategies.
How It Feeds the Month Strength Score
The indicator blends:
•60% Avg Monthly Return (normalized)
•40% Win Rate
This means:
•Big moves matter more than small consistency
•But consistency still matters enough to prevent distortion
Result:
Month Strength Score (0–100)
Which is then used to:
•tighten or relax A+ thresholds
•activate weak-month strict rules
•control trade frequency
🔹2. Intended Use
The indicator is designed as a discretionary analysis tool to support study of:
• seasonal bias and calendar tendencies
• relative strength/weakness across months
• how strict trade selection should be across different regimes
• confluence behavior when seasonal conditions are unfavorable
The tool does not generate forecasts, does not guarantee outcomes, and should not be relied upon as a stand-alone decision mechanism.
🔹3.How to Use XAU Seasonality Engine
Recommended charts: XAUUSD, intraday (5m–15m) with a HTF context (1H–4H).
1. Identify the Seasonal Regime
• Strong month → you can allow more continuation bias (still require structure).
• Neutral month → trade normally, standard criteria.
• Weak month → tighten selection, demand clean A+ conditions only.
2. Read the Month Strength Histogram
• If the score is high (e.g., 70+), the month has historically shown stronger tendency.
• If the score is low (e.g., 40 and below), expect slower conditions, deeper pullbacks, or more chop — and reduce marginal trades.
3. Use the Setup Quality Meter as the Gate
► In normal/strong months:
• A+ threshold is moderate (e.g., 70)
► In weak months:
• A+ threshold is higher (e.g., 80+)
• Optional strict mode: must also pass BOS + Sweep + FVG alignment
4. Example Trade Logic (Framework, Not Signals)
► Bullish framework in a Strong Month:
• Seasonal regime = Strong (tailwind)
• Structure supports bullish continuation (trend alignment)
• Sweep occurs into demand / liquidity grab
• Setup Quality reaches A+ threshold
• Entry: confirmation candle or retrace to key level
• SL: beyond sweep low / invalidation
• TP: nearest liquidity / prior highs / HTF level
► Weak Month rule-set (Strict Mode):
• Seasonal regime = Weak (headwind)
• Only consider trades if:
✅ BOS confirms direction
✅ Sweep occurs and rejects cleanly
✅ FVG exists recently (or is mitigated if you choose that model)
✅ Setup Quality exceeds the elevated adaptive threshold
If any one is missing → no trade
This is not meant to “predict” gold — it’s meant to enforce discipline when seasonality historically underperforms.
🔹4.Limitations and User Responsibility
► The indicator does not represent financial advice or imply performance expectations.
► Seasonality is statistical tendency, not certainty — macro conditions can override it.
► Results vary by broker feed, timeframe, and settings.
► Users should test thoroughly in simulation before applying to live markets.
► All trading decisions, risk management, and execution remain solely the responsibility of the user.
🔹5. Alerts
Optional alerts can notify when:
• a new month begins and the seasonal regime changes
• A+ criteria are met
• weak-month strict conditions pass (BOS + Sweep + FVG)
Alerts are informational only and do not constitute actionable recommendations.
Disclaimer
This script is provided for informational and educational purposes only. It does not provide financial, investment, or trading advice, and it does not guarantee profits or future performance. All decisions made based on this script are solely the responsibility of the user.
This script does not execute trades, manage risk, or replace the need for trader discretion. Market behavior can change quickly, and past behavior detected by the script does not ensure similar future outcomes.
Users should test the script on demo or simulation environments before applying it to live markets and must maintain full responsibility for their own risk management, position sizing, and trade execution.
Trading involves risk, and losses can exceed deposits. By using this script, you acknowledge that you understand and accept all associated risks.
The tool blends month-of-year seasonality statistics with higher-timeframe context and a setup-quality gate to help users observe when market conditions historically lean strong, weak, or neutral — and how strict trade selection should be during each regime.
Indicator Concept
An indicator for XAUUSD that combines:
1. Seasonality Regime (Month-of-Year Bias)
► Classifies the current month as Strong / Weak / Neutral based on either:
• Preset months (user-defined)
or
• Auto mode (computed from historical monthly performance)
► Strong months suggest a bullish tailwind (not a signal).
► Weak months suggest headwind / caution and require stricter setup quality.
2. Monthly Performance Engine (Under the Hood)
► Uses the symbol’s monthly timeframe data to compute, per calendar month:
• Average monthly return (%)
• Win rate (%) — how often that month closes positive
• Month Strength Score (0–100) — a blended score derived from performance data
► The score is designed to provide a relative strength snapshot of seasonality by month.
3. Month Strength Histogram
► Plots a histogram (0–100) of the current month’s strength score.
• Higher bars = historically stronger month tendency
• Lower bars = historically weaker month tendency
► Optional horizontal reference lines mark “strong” and “weak” zones to make regimes obvious at a glance.
4. Setup Quality Meter (Confluence Filter)
► The indicator calculates a Setup Quality Score (0–100) using market structure and momentum components, such as:
• EMA trend alignment
• Momentum confirmation (EMA fast vs slow)
• Structure break confirmation (BOS)
• Liquidity sweep behavior
• Candle confirmation logic
► This score is intended as a trade-selectivity filter, not a trade executor.
5. Adaptive Rules for Weak Months (Strict Mode)
► When the indicator detects a weak seasonal regime, conditions automatically tighten:
• The A+ threshold increases (adaptive thresholding)
• Optional rule: Weak months require BOS + Sweep + FVG simultaneously before any A+ condition is considered valid
This forces the user into “higher-quality-only” behavior during historically weaker seasonal periods.
🔹1 Visual Components Included
• Seasonality regime label (Strong / Weak / Neutral)
• Optional background shading based on regime
• Month Strength Score histogram (0–100)
• Current month stats: Avg return + win rate
• Setup Quality Meter value (0–100)
• Adaptive A+ threshold display
• Weak-month confluence gate status (BOS / Sweep / FVG pass/fail)
• Optional alerts when strict criteria are met
➣What [Win Rate] Means in the XAU Indicator
🔹 Definition (in THIS indicator)
Win Rate = the percentage of historical months that closed positive for the same calendar month.
It is NOT:
trade win rate ❌
signal accuracy ❌
It is a statistical seasonality metric.
How It’s Calculated
For each calendar month (January, February, etc.), the indicator:
1.Looks at historical monthly candles (Monthly timeframe).
2. Counts how many times that month:
•Closed higher than it opened (or higher than previous month close).
3. Divides:
Number of positive months
÷
Total number of observed months
× 100
Example: September
If over the last 20 years:
September closed green 14 times
September closed red 6 times
Then:
Win Rate = (14 / 20) × 100 = 70%
That’s what you see as [Win Rate] in the dashboard.
What the Win Rate Is Used For
1️⃣ Part of the Month Strength Score
The indicator blends:
•Average Monthly Return (%) → measures magnitude
•Win Rate (%) → measures consistency
Combined into:
Month Strength Score (0–100)
This avoids a common trap:
•A month with 1 huge rally but many losses ≠ reliable
•A month with steady positive closes = higher quality environment
What Win Rate Tells You
High Win Rate (e.g. 65–75%)
•Gold more often closes higher in this month
•Continuation is statistically more likely
•Pullbacks are more likely to resolve in trend direction
Low Win Rate (e.g. 35–45%)
•Gold more often fails to close higher
•More chop, deeper retracements, false breakouts
•Continuation trades statistically struggle
What It Does NOT Tell You
🚫 It does NOT mean:
•“You will win 70% of your trades”
•“Every setup in this month works”
•“Direction is guaranteed”
Seasonality is context, not prediction.
Why This Is Powerful When Combined With Your System
On its own, win rate is just data.
But in your indicator, it’s used to:
•🔒 Raise the A+ threshold in weak months
•🧠 Force BOS + Sweep + FVG confluence
•❌ Block marginal setups automatically
So instead of guessing:
-“Why is gold so choppy this month?”
You know:
-“This month historically underperforms SO I must be stricter.”
➣What [Avg Monthly Return] Means in the XAU Seasonality Indicator
🔹 Definition (in THIS indicator)
Avg Monthly Return = the average percentage gain or loss of XAUUSD for a specific calendar month, calculated across many years.
It measures magnitude, not frequency.
It is NOT:
•trade profit ❌
•expected return for the next month ❌
•guaranteed performance ❌
It is a historical seasonality tendency.
How It’s Calculated
For each calendar month (January, February, etc.), the indicator:
1.Takes every historical occurrence of that month.
2.Calculates the percentage change of the monthly candle:
(Monthly Close − Previous Monthly Close)
÷ Previous Monthly Close × 100
3. Adds all those percentage changes together.
4. Divides by the total number of observations.
Example: September
Assume over 20 years:
+2.4%, +1.1%, −0.6%, +3.0%, +1.8%, ...
If the sum of all September returns = +28% across 20 years:
Avg Monthly Return = +1.40%
That’s the number displayed in the indicator.
What Avg Monthly Return Is Used For
1️⃣ Measuring Strength of Movement
•Win Rate → “How often does it close green?”
•Avg Monthly Return → “How big are the moves when it works?”
Both are needed.
A month can:
•Win often but move very little
•Move a lot but only occasionally
The indicator combines both to avoid misleading conclusions.
How to Interpret Avg Monthly Return
Positive Avg Return (e.g. +0.8% to +2.0%)
•Gold tends to expand during this month
•Continuation phases are more likely
•Pullbacks are often absorbed
Near-Zero Avg Return (e.g. −0.2% to +0.2%)
•Market is statistically balanced
•Expect chop, rotations, false breaks
•Continuation is less reliable
Negative Avg Return (e.g. −0.5% or worse)
•Downward pressure or heavy mean reversion
•Rallies often fade
•Risk of aggressive stop hunts
What Avg Monthly Return Does NOT Mean
🚫 It does NOT mean:
•“Price will move +1.4% this month”
•“You should buy because the number is positive”
•“This is a guaranteed edge”
It describes historical behavior, not future certainty.
Why Avg Monthly Return Matters More Than People Think
Two months can have the same win rate but behave very differently:
Example:
Month Win Rate Avg Return Reality
Month A 65% +0.2% Small, choppy wins
Month B 55% +1.6% Fewer wins, but strong expansions
Your indicator would rank Month B as stronger, which is correct for continuation-based strategies.
How It Feeds the Month Strength Score
The indicator blends:
•60% Avg Monthly Return (normalized)
•40% Win Rate
This means:
•Big moves matter more than small consistency
•But consistency still matters enough to prevent distortion
Result:
Month Strength Score (0–100)
Which is then used to:
•tighten or relax A+ thresholds
•activate weak-month strict rules
•control trade frequency
🔹2. Intended Use
The indicator is designed as a discretionary analysis tool to support study of:
• seasonal bias and calendar tendencies
• relative strength/weakness across months
• how strict trade selection should be across different regimes
• confluence behavior when seasonal conditions are unfavorable
The tool does not generate forecasts, does not guarantee outcomes, and should not be relied upon as a stand-alone decision mechanism.
🔹3.How to Use XAU Seasonality Engine
Recommended charts: XAUUSD, intraday (5m–15m) with a HTF context (1H–4H).
1. Identify the Seasonal Regime
• Strong month → you can allow more continuation bias (still require structure).
• Neutral month → trade normally, standard criteria.
• Weak month → tighten selection, demand clean A+ conditions only.
2. Read the Month Strength Histogram
• If the score is high (e.g., 70+), the month has historically shown stronger tendency.
• If the score is low (e.g., 40 and below), expect slower conditions, deeper pullbacks, or more chop — and reduce marginal trades.
3. Use the Setup Quality Meter as the Gate
► In normal/strong months:
• A+ threshold is moderate (e.g., 70)
► In weak months:
• A+ threshold is higher (e.g., 80+)
• Optional strict mode: must also pass BOS + Sweep + FVG alignment
4. Example Trade Logic (Framework, Not Signals)
► Bullish framework in a Strong Month:
• Seasonal regime = Strong (tailwind)
• Structure supports bullish continuation (trend alignment)
• Sweep occurs into demand / liquidity grab
• Setup Quality reaches A+ threshold
• Entry: confirmation candle or retrace to key level
• SL: beyond sweep low / invalidation
• TP: nearest liquidity / prior highs / HTF level
► Weak Month rule-set (Strict Mode):
• Seasonal regime = Weak (headwind)
• Only consider trades if:
✅ BOS confirms direction
✅ Sweep occurs and rejects cleanly
✅ FVG exists recently (or is mitigated if you choose that model)
✅ Setup Quality exceeds the elevated adaptive threshold
If any one is missing → no trade
This is not meant to “predict” gold — it’s meant to enforce discipline when seasonality historically underperforms.
🔹4.Limitations and User Responsibility
► The indicator does not represent financial advice or imply performance expectations.
► Seasonality is statistical tendency, not certainty — macro conditions can override it.
► Results vary by broker feed, timeframe, and settings.
► Users should test thoroughly in simulation before applying to live markets.
► All trading decisions, risk management, and execution remain solely the responsibility of the user.
🔹5. Alerts
Optional alerts can notify when:
• a new month begins and the seasonal regime changes
• A+ criteria are met
• weak-month strict conditions pass (BOS + Sweep + FVG)
Alerts are informational only and do not constitute actionable recommendations.
Disclaimer
This script is provided for informational and educational purposes only. It does not provide financial, investment, or trading advice, and it does not guarantee profits or future performance. All decisions made based on this script are solely the responsibility of the user.
This script does not execute trades, manage risk, or replace the need for trader discretion. Market behavior can change quickly, and past behavior detected by the script does not ensure similar future outcomes.
Users should test the script on demo or simulation environments before applying it to live markets and must maintain full responsibility for their own risk management, position sizing, and trade execution.
Trading involves risk, and losses can exceed deposits. By using this script, you acknowledge that you understand and accept all associated risks.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
⚔️ Markets reward discipline, not hope.
WarRoomXYZ trades liquidity, structure, and timing with predefined risk and zero emotion.
If you chase price, you are the liquidity.
Prepare. Execute. Survive.
t.me/warroomxyz
WarRoomXYZ trades liquidity, structure, and timing with predefined risk and zero emotion.
If you chase price, you are the liquidity.
Prepare. Execute. Survive.
t.me/warroomxyz
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
⚔️ Markets reward discipline, not hope.
WarRoomXYZ trades liquidity, structure, and timing with predefined risk and zero emotion.
If you chase price, you are the liquidity.
Prepare. Execute. Survive.
t.me/warroomxyz
WarRoomXYZ trades liquidity, structure, and timing with predefined risk and zero emotion.
If you chase price, you are the liquidity.
Prepare. Execute. Survive.
t.me/warroomxyz
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.