OPEN-SOURCE SCRIPT
Updated

Quarterly Theory Cycles [Oracle]

28 360
WHAT THIS INDICATOR DOES

snapshot

Quarterly Theory Cycles is a multi-layer time cycle visualisation tool that plots up to 8 nested Quarterly Theory cycles simultaneously — from Nano sessions all the way up to the Quadrennial cycle. Each cycle is divided into its four quarters (Q1 through Q4) and displayed as color-coded boxes, either in a dedicated sub-pane below the chart or directly overlaid on price as clean on-chart boxes that auto-scale to your visible price action.

It is a purely graphical time tool. It shows you exactly where you are within every layer of the Quarterly Theory time structure at a glance, without cluttering your chart with unnecessary drawings or data.

THE CONCEPTS — WHAT EACH ONE IS AND HOW IT IS CALCULATED

Quarterly Theory Time Cycles

Quarterly Theory, as taught by TraderDaye, divides trading time into nested cycles where each cycle is split into four quarters. These quarters represent a repeating sequence:

snapshot

  • Q1 — Accumulation. The cycle's range is being established. This phase is required for a cycle to occur.
  • Q2 — Manipulation. The cycle transitions from accumulation into distribution. The opening price of Q2 is the True Open — a key reference level for premium/discount analysis.
  • Q3 — Distribution. This is where the main move of the cycle typically occurs.
  • Q4 — Reversal or Continuation. The cycle either reverses or continues into the next cycle.


This A-M-D-X sequence repeats at every scale of time. The indicator computes cycle boundaries for 8 nested levels, each one being a subdivision of the level above it.

The 8 Cycle Layers

Quadrennial Cycle

The longest cycle, spanning four years. The indicator assigns quadrennial quarters based on the year modulo 4. Each quarter represents one calendar year within a four-year macro cycle.

Yearly Cycle

The year is divided into four quarters of three months each, analogous to financial quarters:

  • Q1 — January, February, March
  • Q2 — April, May, June (True Open at April open)
  • Q3 — July, August, September
  • Q4 — October, November, December


The indicator detects yearly quarter transitions by checking when the month crosses into a new calendar quarter.

Monthly Cycle

Each month is divided into four weekly quarters. The cycle starts on the first trading week of the month (detected by the Sunday session open), and each subsequent week represents the next quarter. Months with a 5th week produce a Q0 (joker week).

The indicator detects monthly quarter transitions by checking when a new trading week begins at the Sunday session open and tracking how many weeks have elapsed since the month started.

Weekly Cycle

The trading week is divided into four daily quarters. Following Quarterly Theory, Friday and Sunday's small session are excluded from the main cycle:

  • Q1 — Monday
  • Q2 — Tuesday (True Open at Tuesday's daily open)
  • Q3 — Wednesday
  • Q4 — Thursday
  • Q0 — Friday


The indicator assigns weekly quarters based on the day of the week relative to the Sunday 18:00 ET session open.

Daily Cycle

The trading day is divided into four 6-hour sessions:

  • Q1 — 18:00 to 00:00 (Asian session)
  • Q2 — 00:00 to 06:00 (London session, True Open at midnight NY time)
  • Q3 — 06:00 to 12:00 (New York AM session)
  • Q4 — 12:00 to 18:00 (New York PM session)


The indicator calculates daily quarter boundaries using the hour of day relative to the exchange-specific day-start anchor.

90-Minute Cycle

Each daily session quarter (6 hours) contains four 90-minute cycles. The indicator computes these by dividing elapsed time from the day-start anchor into 90-minute intervals and determining which quarter of the interval the current bar falls in.

Micro Cycle

Each 90-minute cycle divides into four quarters of 22.5 minutes each — known as Micro Sessions. The indicator uses millisecond-precision interval arithmetic to compute these boundaries, accounting for the half-minute offset (22 minutes 30 seconds per quarter).

Nano Cycle

The finest resolution — each Micro Session divides into four Nano quarters of approximately 5 minutes 37.5 seconds each. The indicator computes these using sub-minute timestamp arithmetic and is only relevant on sub-minute chart timeframes (15s, 30s, 45s).

Exchange-Specific Day Start

All cycle calculations anchor to the correct trading day start time based on your broker's exchange:

  • CME / CBOT futures — 17:00 ET
  • FX brokers (FXCM, OANDA, FOREXCOM) — 18:00 ET
  • Crypto exchanges (Binance, Kraken, Coinbase, etc.) — 22:00 UTC


This ensures cycle boundaries align correctly regardless of which broker or asset class you are charting.

HOW THE DISPLAY WORKS

Sub-Pane Mode (Default)

snapshot

The indicator renders in a separate pane below your chart. Each cycle layer occupies its own horizontal lane, stacked vertically — Nano at the top, Quadrennial at the bottom. Each quarter within a cycle is drawn as a coloured box that extends from the quarter's start bar to its end bar.

Box colours correspond to quarters: Q1, Q2, Q3, Q4, and Q0 each have a configurable colour. Each box is labeled with the quarter name. For certain cycles, contextual labels are used instead of generic quarter numbers — for example, the daily cycle shows "Asia," "London," "NY am," and "NY pm," while the weekly cycle shows "Monday" through "Friday."

This gives you a complete, at-a-glance view of where you are within every layer of the time structure simultaneously.

On-Chart Mode

snapshot

The indicator can also display cycles directly overlaid on your price chart as colored boxes that float above the candles. In this mode, only the chart timeframe's corresponding cycle is shown (e.g., on a 5m chart, the 90-minute cycle is displayed on-chart).

The on-chart boxes automatically scale their vertical position based on your visible price action — they track the highest high and use the average bar range to position themselves cleanly above price without overlapping candles. Quarter divider lines extend vertically through the full price range.

An option to show the previous completed cycle during Q1 keeps the prior cycle's boxes visible at the same height, so you can reference the previous cycle's quarter structure while the new cycle is just beginning.

On-chart mode can be used alongside the sub-pane, or exclusively by enabling "Only" mode which hides the sub-pane entirely.

Automatic Layer Selection

By default, the indicator automatically determines which cycle layers to display based on your chart timeframe. You configure how many layers you want visible (1 to 8), and the indicator selects the appropriate layers ascending from your chart's native cycle level.

For example, on a 5m chart with 3 layers, you see the 90-minute, daily, and weekly cycles. On a 15m chart with 3 layers, you see the daily, weekly, and monthly cycles. This keeps the display relevant without manual configuration.

Alternatively, manual mode lets you toggle each of the 8 cycle layers independently regardless of your chart timeframe.

HOW THE CONCEPTS WORK TOGETHER

The nested cycle structure is not 8 independent timers running in parallel — they are a single fractal hierarchy where each level is a subdivision of the one above it:

  1. The quadrennial cycle provides the macro context. Where you are in the 4-year cycle influences yearly bias — Q1 years tend to accumulate, Q3 years tend to distribute.
  2. The yearly cycle narrows to the current quarter. Within the macro context, you know whether the year is in accumulation (Jan-Mar), manipulation (Apr-Jun), distribution (Jul-Sep), or reversal (Oct-Dec).
  3. The monthly cycle positions you within the month. Week 1 is accumulation, week 2 begins distribution from the True Monthly Open.
  4. The weekly cycle positions you within the week. Monday accumulates, Tuesday begins manipulation from the True Weekly Open, Wednesday distributes, Thursday reverses.
  5. The daily cycle positions you within the session. Asia accumulates, London manipulates from the True Daily Open (midnight), NY AM distributes, NY PM reverses.
  6. 90-minute, micro, and nano cycles provide execution timing. Within the broader directional context set by the higher cycles, these lower cycles tell you exactly when within a session the accumulation, manipulation, distribution, and reversal phases occur at the finest resolution.


Seeing all of these layers simultaneously lets you identify when multiple cycles are in the same phase — for example, when the weekly Q3 (distribution), daily Q3 (NY AM distribution), and 90-minute Q3 (distribution within the session) all align, you know you are in a high-probability distribution window across the entire time fractal.

WHY USE THIS INDICATOR

Several Quarterly Theory cycle indicators exist on TradingView. Here is what makes this one different:

  • On-chart cycle display. Most QT cycle tools only render in a separate sub-pane. This indicator can overlay cycles directly on your price chart as auto-scaling boxes that float cleanly above candles, giving you the cleanest possible view of where you are in the cycle without splitting your attention between panes. The previous-cycle carry-over during Q1 is a unique touch that no other cycle indicator offers.
  • 8 nested layers computed simultaneously. From Nano (5.6 minutes) to Quadrennial (4 years), every layer is calculated and available. Most cycle tools cover 4 to 6 levels at most.
  • Contextual quarter labels. Instead of generic Q1/Q2/Q3/Q4 everywhere, the indicator displays session names (Asia, London, NY AM, NY PM), day names (Monday through Friday), and week numbers where appropriate, making it immediately readable.
  • Automatic layer selection. Choose how many layers you want and the indicator picks the right ones for your timeframe. No manual configuration needed unless you want it.
  • Full exchange support. Day-start anchors automatically adjust for futures, FX, and crypto exchanges, ensuring cycle boundaries are correct regardless of your broker.


If you are a Quarterly Theory trader, this is the simplest and cleanest way to always know exactly where you are in every layer of the time structure.

HOW TO USE IT

  1. Add the indicator to your chart. It immediately displays the appropriate cycle layers for your timeframe in the sub-pane.
  2. Each coloured box represents one quarter of a cycle. Use the default colors or customize Q1/Q2/Q3/Q4/Q0 colours to your preference.
  3. Read the labels inside each box to know which quarter and session you are in.
  4. Enable on-chart mode to overlay cycles directly on your price chart for a cleaner workflow.
  5. Adjust the number of layers (1 to 8) to control how much time structure you see — fewer layers for simplicity, more for complete fractal context.
  6. Use manual mode if you want to toggle specific cycle levels independently.
  7. Combine with other Quarterly Theory tools — use the cycle display to know when you are in a Q2 manipulation or Q3 distribution phase, then look for SSMTs, PSPs, or tCISDs within that context.


SETTINGS OVERVIEW

  • Cycles — Manual/auto mode toggle, number of layers to show (1-8), individual cycle toggles for manual mode
  • On-Chart — On-chart overlay toggle, exclusive on-chart mode, previous cycle visibility during Q1
  • Colours — Q1/Q2/Q3/Q4/Q0 box colours, text colour, divider line colour/width/style


SUPPORTED TIMEFRAMES

  • 15s / 30s / 45s — Nano + Micro cycles and above
  • 1m / 3m — Micro cycles and above
  • 5m — 90-minute cycles and above
  • 15m — Daily cycles and above
  • 1H / 90m — Weekly cycles and above
  • 4H / 6H — Monthly cycles and above
  • 1D — Yearly cycles and above
  • 1W — Quadrennial cycle
  • 1M — Quadrennial cycle


INDICATOR SETTINGS/FILTERS

Here is an inside look of how the Quarterly Theory Cycles [Oracle] looks:
snapshot

DISCLAIMER

This indicator is for educational and informational purposes only. It does not constitute financial advice. Trading involves substantial risk of loss. Always use proper risk management and conduct your own analysis.

CREDITS

Developed by Danielliuks (z3nius) and bucko. Conceptual framework based on ICT (Michael Huddleston) and Quarterly Theory as taught by TraderDaye.
Release Notes
Fixed an issue where EUR/USD (FXCM), GBP/USD (FXCM), and DXY (CAPITALCOM) quarters were not displaying correctly.
Release Notes
Fixed an issue where Micro Quarter levels were plotting 1 minute off.
Release Notes
Fixed an issue where the monthly cycle was displayed incorrectly when viewed in the weekly cycle.
Release Notes
Fixed an issue where the Monthly Cycle (4H) view was incorrectly displaying week data.
Release Notes
Fixed an issue where the Monthly Cycle (4H) view was incorrectly displaying week data after the Joker week.
Release Notes
- Monthly Cycle — now working correctly on forex and crypto.

- Updated to the latest getCycle functionality — brought in line with the newest cycle engine for improved accuracy and consistency.
Release Notes
- Bug Fixes

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.