Seasonal Edge Clock [AGPro Series]

🧠 Core Idea
Does the clock favor your trade right now — and when has this market historically paid to be long or short?
Seasonal Edge Clock turns that single question into a measurable, on-chart answer.
📌 Overview / What it does
Seasonal Edge Clock is a time-based statistical edge engine. It studies how the current symbol has behaved across the clock — by hour of day, day of week, or month of year — and converts that history into a live, readable decision.
For every clock window it measures the average move, the historical win rate, and how far that window deviates from the symbol's own baseline. Those statistics are compressed into a single 0–100 Time Edge score with a directional bias, then surfaced through three layers: a seasonal heatmap clock, a decision panel, and a few clean on-chart badges marking the strongest long and short windows.
It does NOT predict price, generate buy/sell orders, or promise outcomes. It is a context and timing tool: it tells you whether the present window has historically carried an edge, in which direction, and how strong that edge is — so timing becomes a deliberate decision instead of a guess.
🎯 Purpose & Design Philosophy
Most traders already know the "what" and the "where" of a setup. The missing dimension is usually the "when." Markets are not uniform across the clock: some hours, weekdays, or months have repeatedly delivered stronger directional behavior than others, while many windows are simply noise.
Seasonal Edge Clock was built to expose that hidden time dimension cleanly, without flooding the chart. It is designed for intraday traders selecting their active hours, swing traders choosing their days, and position traders weighing seasonal tendencies — anyone who wants their entries to align with windows that have historically rewarded a direction, and to step aside when the clock is flat.
The mindset it supports is selectivity: trade when time is on your side, reduce or wait when it is not.
⚡ Why This Script Is Different
Most timing tools simply draw sessions, mark open hours, or color a clock. They show WHEN something happens, not whether that WHEN has mattered.
This script does NOT just label sessions or repaint generic time zones.
Instead, it quantifies the historical edge of each clock window — average move, win rate, and deviation from baseline — and ranks them into a 0–100 Time Edge with a Prime / Neutral / Dead-zone verdict. The output is a decision ("the clock favors longs here"), not a decoration.
⚙️ Methodology
1. Time Bucketing
Every confirmed historical bar is assigned to a clock window based on the selected mode: Hour of Day (24 windows), Day of Week (7), or Month of Year (12). Auto mode picks the most relevant resolution for the chart timeframe (1m–1h → hour, 2h–1D → weekday, 1W and above → month). A timezone input controls how bars map to windows.
2. Statistical Aggregation
For each window the engine accumulates sample count, up-close count, and summed open-to-close return — all on confirmed bars only, so values are stable.
3. Edge Scoring
Each window's average return is compared to the symbol's overall baseline. The deviation is normalized against the dispersion of all windows (a z-score), then blended with the window's win-rate confidence into a single 0–100 Time Edge. Direction (bias) follows the sign of the deviation.
4. Decision Layer
The active window's score becomes a live verdict, the strongest long and short windows are identified, and a plain-language next action is produced.
5. Visual Output
Results are rendered as a heatmap clock, a decision panel, and sparse on-chart badges.
🗺️ How to Read the Chart
• Heatmap Clock (strip) — every window colored by bias (teal = bullish, pink = bearish, amber = flat) and shaded by edge strength. The active window is highlighted. Each cell prints win %, average move, or edge (selectable).
• Decision Panel — Mode, the active window (Now), the Verdict badge, Time Edge score, Bias, Win Rate, Average Move, Samples, the Best Long and Best Short windows, and a Next Action line.
• On-Chart Badges — a teal "▲ Favored / Prime Long" badge marks the symbol's strongest long window; a pink "▼ Favored / Prime Short" badge marks the strongest short window. Badges sit clear of the candles; hover for the full window and edge detail.
• Background Tint — a soft shade appears while a strongest long or short window is active.
These three views adapt automatically to the timeframe — Day of Week on swing charts, Hour of Day on intraday charts:
🚦 Signals & States
• Prime long window → strong historical bullish edge in the active window
• Prime short window → strong historical bearish edge in the active window
• Mild long / short lean → modest directional tendency, use as confluence only
• Dead zone → flat historical edge, no timing advantage
• Building (n) → not enough samples yet for a reliable read
Interpretations are descriptive, not directives.
🔔 Alerts Logic
• Prime Long Window → fires when price enters a window whose Time Edge reaches the Prime threshold with a bullish bias
• Prime Short Window → same, with a bearish bias
• Dead Zone → fires when the active window's edge falls to the dead-zone level
Alerts are attention markers that a notable time window has begun — not trade instructions.
🧩 Confluence Logic
The clock is strongest as a filter on top of your own setups. When a structural or momentum signal aligns with a Prime window in the same direction — for example a long trigger arriving inside a Prime long window — the timing context is reinforced. When your signal fights a Dead zone or an opposing window, that is a reason for caution.
📊 When to Use
• Intraday trading, to select the hours that have historically favored your direction
• Swing trading, to weigh weekday tendencies
• Position trading, to consider month-of-year seasonality
• As a timing filter layered onto existing entry models
⚠️ When NOT to Use
• On symbols with very little history (windows will read "Building")
• Immediately around major one-off events that distort normal seasonality
• In extreme, regime-breaking volatility, where past time patterns may not hold
• As a standalone entry trigger with no other confirmation
🎛️ Key Inputs
• Edge Mode → Auto, or force Hour of Day / Day of Week / Month of Year
• Timezone → how bars map to clock windows (exchange by default)
• Minimum Samples → history required before a window is scored
• Prime / Dead-Zone Thresholds → where the verdict turns Prime or flat
• Window Mark Threshold → how strong a window must be to earn an on-chart badge (controls badge count)
• Min Bars Between Labels → spacing guard that keeps badges sparse and clean
• Panel and Heatmap → show/hide, location, theme (Dark/Light), font size
• Markers → badge size, background tint toggle
🖥️ Interface & Visual Design
The interface follows a clear hierarchy: the heatmap clock for the full seasonal picture, the decision panel for the active read, and a few badges for on-chart context. The panel and heatmap support Dark and Light themes and adjustable placement and sizing, so the tool fits any chart without clutter.
🧪 Practical Usage Workflow
1. Read the panel — what window are we in, and what is the verdict?
2. Scan the heatmap clock — which windows are historically strong, and in which direction?
3. Check the Best Long / Best Short windows for the symbol's prime hours, days, or months.
4. Align with your own setup — treat a Prime window as confirming context, a Dead zone as a reason to wait or trim.
🔍 Interpretation Guidelines
Think of the score as a relative tendency, not a forecast. A high Time Edge means the active window has historically leaned one way more than usual — it raises or lowers conviction, it does not replace analysis. Always weigh the sample size: more samples, more trust.
🚫 What This Script Is NOT
• It is not a prediction engine
• It is not financial advice
• It is not an automated trading system
• It does not generate guaranteed signals
⚠️ Limitations & Transparency
Seasonal patterns are statistical tendencies drawn from past data; they can weaken, shift, or disappear as market regimes change. Timeframe, timezone, and the amount of available history all affect the read. Outputs should always be interpreted within broader market context.
🧠 Market Context Notes
Time-based edges interact with liquidity, session structure, and volatility cycles. A window may read strong simply because of when liquidity concentrates for that asset. Use the clock alongside structure and volatility, not in isolation.
🧾 Use Case Examples
• An intraday trader sees a Prime long window beginning and prioritizes long setups during those hours.
• A swing trader notices the symbol's weakest weekday and avoids initiating new longs there.
• A position trader checks month-of-year tendencies before sizing a seasonal swing.
🧱 System Philosophy
AGPro Series tools are built to guide decisions, not just display data. Seasonal Edge Clock adds the time dimension to that philosophy: a clean, honest read on when a market has historically rewarded a direction, and when it has not.
🔐 Non-Promise Statement
This script makes no guarantees and offers no certainty. Historical edge is not a promise of future results.
📉 Risk Disclosure
Trading involves substantial risk. This script is provided for educational and analytical purposes only and is not financial advice. All trading decisions and their outcomes remain solely your responsibility.
📚 Educational Note
Use Seasonal Edge Clock to build awareness of the time dimension in your market — to learn when your symbol tends to move, in which direction, and how reliably — and to fold that awareness into a disciplined, context-driven process.
This focused maintenance update improves statistical integrity, timing consistency, readability, and interface behavior while preserving the original Seasonal Edge Clock concept.
The script still groups chart-bar behavior by hour of day, day of week, or month of year and converts those historical observations into a Time Edge score, heatmap, panel, contextual markers, and alerts.
This script continues to function as an analytical and visualization tool. It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Prior-bar statistical isolation
The active bar is now committed to the historical sample only after all readings, markers, and alerts for that execution have been built. This prevents a completed bar from influencing the historical score assigned to its own window and aligns historical behavior more closely with real-time window starts.
• Corrected centered z-score
The return-deviation z-score is now calculated around the qualified-window mean deviation, matching the dispersion calculation. This removes a scoring inconsistency that could appear when clock windows had unequal sample counts.
• Deterministic window-start events
Window labels and alerts now trigger on the first update of a new clock bucket. Their conditions use statistics from previously completed bars only. This makes historical and real-time event timing consistent, particularly in Hour of Day mode.
• Mutually exclusive state thresholds
The effective Low-Edge threshold is capped below the Prime threshold. Even if users choose overlapping input values, Prime and Low-Edge states cannot conflict.
• Stable label offsets
Marker placement now uses the previous completed bar's ATR/TR reference. Labels remain clear of candles without depending on the unfinished range of the new window's first bar.
------------------------
Visual Improvements
------------------------
• Replaced directional trade-style badges with compact premium labels:
BULLISH WINDOW | E##
BEARISH WINDOW | E##
• Updated tooltips to describe historical tendency and Time Edge without presenting an instruction.
• Simplified the heatmap title to one merged blue row containing only the script name: AG Pro Seasonal Edge Clock.
• Improved weak-cell heatmap contrast so highly transparent cells remain legible on both Dark and Light themes.
• Replaced long/short wording in the panel's best-window rows with Best Bullish / Best Bearish.
• Replaced the panel's Next Action row with a neutral Context row.
------------------------
Interface & Usability
------------------------
• Panel and heatmap tables now clear immediately when their visibility inputs are disabled, preventing stale table remnants.
• Show Panel remains enabled by default.
• Panel location, panel theme, panel font size, heatmap location, heatmap font size, and label size controls remain intact.
• Dark and Light panel themes remain available and were live-tested.
• Auto mode remains unchanged:
1m–1h → Hour of Day
2h–1D → Day of Week
1W and above → Month of Year
------------------------
Behavior Notes
------------------------
The core analytical concept is unchanged.
Statistics measure open-to-close returns of the active chart bars and group those bar returns by the selected clock bucket. In Month of Year mode on a weekly chart, for example, the engine evaluates weekly bar returns grouped by the month in which each bar opens; it does not calculate calendar-month close-to-close returns.
All displayed statistics are now based on prior completed bars. The current confirmed bar becomes available to subsequent executions after it is committed at the end of the calculation.
The input name Dead-Zone Threshold is retained for continuity, while the visible state is expressed as LOW-EDGE WINDOW for clearer and more neutral interpretation.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Historical time tendencies can weaken, shift, or disappear. Timeframe, timezone, available history, unequal window sample counts, liquidity changes, and volatility regimes affect the output.
Time Edge is a relative historical measure, not a forecast probability.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice, automated trading, guaranteed signals, or guaranteed outcomes.
Users remain responsible for their own analysis and decisions.
• Refreshed the publication and access routing information.
• Core seasonal-edge timing logic, panel behavior, inputs, alerts, visuals, and outputs remain unchanged.
This update focuses on sample-aware edge scoring, confidence evidence, heatmap contrast, and chart spacing.
The core purpose of the script remains unchanged.
This release improves how historical timing tendencies are scored, presented, and interpreted.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
• Added sample-maturity weighting
Time Edge now incorporates the number of observations behind each window. Young windows remain visible but no longer receive the same confidence as mature windows.
• Added a 90% Wilson win-rate floor
The panel now separates observed win rate from a conservative confidence floor.
• Added Sample Quality
The active window reports both its observation count and a 0–100 maturity score.
• Simplified verdict language
Prime, Lean, Low-Edge, Neutral, and Building states replace longer wording that could overstate weak tendencies.
• Added cross-side label spacing
Bullish and bearish badges now use a shared spacing guard to reduce adjacent-label overlap.
------------------------
Visual Improvements
------------------------
• Added the question “IS THIS TIME WINDOW HISTORICALLY DISTINCT?”
• Reduced recurring background tint intensity
• Added opaque alternating panel rows for Dark and Light themes
• Improved heatmap value contrast on pale bullish and bearish cells
• Highlighted the active heatmap value cell
• Preserved the signature clock heatmap and recurring edge-window labels
------------------------
Interface & Usability
------------------------
• Panel visibility, location, theme, and font size remain configurable
• Heatmap visibility, location, metric, and font size remain configurable
• Label size, same-side spacing, and cross-side spacing are configurable
• Win evidence and sample maturity are now visible at first glance
------------------------
Behavior Notes
------------------------
Edge direction still comes from each window’s historical average move relative to the symbol-wide baseline.
The update adjusts edge magnitude for sample maturity. This may reduce scores for windows with limited history.
Alerts continue to use the active confidence-adjusted Time Edge state.
------------------------
Limitations Reminder
------------------------
Seasonal and intraday tendencies can change as market structure, liquidity, exchange hours, and participant behavior evolve.
Results depend on the available chart history, symbol, timeframe, timezone, and selected mode.
Historical timing tendencies do not guarantee future outcomes.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
This release improves publication spacing, marker lifecycle, and decision hierarchy while preserving the prior-bar seasonal statistics, confidence-adjusted Time Edge scoring, window states, heatmap logic, and alert conditions.
• Disabled recurring full-height window tint by default to give price and the signature seasonal heatmap a cleaner visual hierarchy; the optional tint control remains available.
• Increased the default same-side marker interval to 52 bars so recurring bullish and bearish windows remain visible without overloading the chart.
• Added a six-marker lifecycle limit that automatically removes the oldest seasonal badges and prevents unbounded historical accumulation.
• Added an adjustable ATR marker offset and raised its publication default so bullish and bearish window badges sit farther from candle bodies and wicks.
• Standardized seasonal badges into compact filled AGPro labels with contrast-safe text and a cleaner direction-and-edge hierarchy.
• Strengthened the heatmap header rebuild path by recreating its full title row before applying the merged blue header.
• Promoted the panel’s Use guidance into a dedicated contrast-safe focus cell for faster separation between the statistical read and its intended secondary-context role.
• Preserved the time bucketing, prior-bar statistical isolation, sample-maturity weighting, Wilson confidence floor, best-window selection, verdict thresholds, and three alerts without analytical changes.
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AGProLabs directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
Disclaimer
Invite-only script
Only users approved by the author can access this script. You'll need to request and get permission to use it. This is typically granted after payment. For more details, follow the author's instructions below or contact AGProLabs directly.
TradingView does NOT recommend paying for or using a script unless you fully trust its author and understand how it works. You may also find free, open-source alternatives in our community scripts.
Author's instructions
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/