PROTECTED SOURCE SCRIPT
Quarterly Cycles by [M1rage]

Quarterly Cycles by [M1rage] — Indicator Description (English)
Purpose
“Quarterly Cycles by [M1rage]” is a multi-time-frame tool that visualizes recurring market rhythms—from 90-minute sessions up to annual cycles—and highlights Seasonal & Session-to-Session Market Transitions (SSMT).
It helps discretionary and quantitative traders:
See where the current bar sits inside intraday, daily, weekly, monthly, and yearly cycles.
Spot fresh highs/lows relative to the previous cycle and immediately know whether the move is confirmed across correlated assets.
Detect potential reversals via automated divergence markup (positive vs negative extremes in the same swing).
Core Logic
Cycle Engine
Computes cycle starts from a fixed reference (1972-12-31 23:00 GMT+3, adjustable via the Time Offset input).
Draws one of nine cycle layers depending on the active chart resolution:
Time-frame Cycle(s) Rendered Box Style
5 min / 15 min 90 min & 6 h 90 m boxes: filled, 6 h boxes: border only
60 min 6 h & 1 day 6 h boxes: filled, 1 D boxes: border
4 h 1 day & 1 week 1 D boxes: filled, 1 W boxes: border
1 D 22.5 day (quarter inside a 90-day period) border
1 W 3-month, 1-year 3 M filled, 1 Y border
Color Scheme
Four-color palette (gray → red → green → blue) cycles every quarter; colors are reused consistently across all layers so you can correlate quickly.
Dynamic Boxes
Each box expands in real-time until the cycle completes, then freezes; a limited history (maxCycleBoxes, default = 250) is retained to save CPU.
SSMT Divergence Scanner
For every completed cycle the script compares new highs/lows with the previous cycle for (a) the main chart symbol and (b) up to three optional symbols.
If the main asset makes a higher high and at least one satellite asset makes a lower high (or vice-versa), the indicator draws:
A solid line between the two swing extremes.
A circle label with a tooltip listing the diverging asset symbols.
Works independently on the 90 m, 6 h, 1 D, and 1 W cycle layers.
Toggle historic marks with Show History to avoid clutter.
Inputs Overview
Group Key Settings Function
Time Settings Time Offset Shift all cycle anchors by ±12 h in 1-h steps to sync with custom sessions.
Cycle Settings Show Quarter Cycles, Box Limit, Line Style, Line / BG Transparency, Label Font & Colors Visual customization.
SSMT Settings Up to 3 correlated assets (Asset 2 / 3 / 4) with optional inversion; Show History, Markup Line Width, Label Size Controls divergence detection.
Practical Tips
Lower time-frames (<15 m) are ideal for intraday scalping around 90-minute and 6-hour boxes.
1 D / 1 W layers expose where the current swing sits inside monthly or quarterly structure—useful for swing entries at box extremes.
Combine the label tooltips with your watch-list: when GBPUSD is listed as an opposite asset to EURUSD, watch for mean-reversion setups.
Setting Time Offset = -5 hours aligns the 90-minute cycle start with New-York midnight (useful for FX traders).
Disclaimer
This script is provided for educational purposes only and does not constitute financial advice. Past cyclical behavior does not guarantee future performance. Always test on a demo account or in TradingView’s replay mode before risking capital.
Purpose
“Quarterly Cycles by [M1rage]” is a multi-time-frame tool that visualizes recurring market rhythms—from 90-minute sessions up to annual cycles—and highlights Seasonal & Session-to-Session Market Transitions (SSMT).
It helps discretionary and quantitative traders:
See where the current bar sits inside intraday, daily, weekly, monthly, and yearly cycles.
Spot fresh highs/lows relative to the previous cycle and immediately know whether the move is confirmed across correlated assets.
Detect potential reversals via automated divergence markup (positive vs negative extremes in the same swing).
Core Logic
Cycle Engine
Computes cycle starts from a fixed reference (1972-12-31 23:00 GMT+3, adjustable via the Time Offset input).
Draws one of nine cycle layers depending on the active chart resolution:
Time-frame Cycle(s) Rendered Box Style
5 min / 15 min 90 min & 6 h 90 m boxes: filled, 6 h boxes: border only
60 min 6 h & 1 day 6 h boxes: filled, 1 D boxes: border
4 h 1 day & 1 week 1 D boxes: filled, 1 W boxes: border
1 D 22.5 day (quarter inside a 90-day period) border
1 W 3-month, 1-year 3 M filled, 1 Y border
Color Scheme
Four-color palette (gray → red → green → blue) cycles every quarter; colors are reused consistently across all layers so you can correlate quickly.
Dynamic Boxes
Each box expands in real-time until the cycle completes, then freezes; a limited history (maxCycleBoxes, default = 250) is retained to save CPU.
SSMT Divergence Scanner
For every completed cycle the script compares new highs/lows with the previous cycle for (a) the main chart symbol and (b) up to three optional symbols.
If the main asset makes a higher high and at least one satellite asset makes a lower high (or vice-versa), the indicator draws:
A solid line between the two swing extremes.
A circle label with a tooltip listing the diverging asset symbols.
Works independently on the 90 m, 6 h, 1 D, and 1 W cycle layers.
Toggle historic marks with Show History to avoid clutter.
Inputs Overview
Group Key Settings Function
Time Settings Time Offset Shift all cycle anchors by ±12 h in 1-h steps to sync with custom sessions.
Cycle Settings Show Quarter Cycles, Box Limit, Line Style, Line / BG Transparency, Label Font & Colors Visual customization.
SSMT Settings Up to 3 correlated assets (Asset 2 / 3 / 4) with optional inversion; Show History, Markup Line Width, Label Size Controls divergence detection.
Practical Tips
Lower time-frames (<15 m) are ideal for intraday scalping around 90-minute and 6-hour boxes.
1 D / 1 W layers expose where the current swing sits inside monthly or quarterly structure—useful for swing entries at box extremes.
Combine the label tooltips with your watch-list: when GBPUSD is listed as an opposite asset to EURUSD, watch for mean-reversion setups.
Setting Time Offset = -5 hours aligns the 90-minute cycle start with New-York midnight (useful for FX traders).
Disclaimer
This script is provided for educational purposes only and does not constitute financial advice. Past cyclical behavior does not guarantee future performance. Always test on a demo account or in TradingView’s replay mode before risking capital.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.