Quarterlytheory Candles [Fractal Edition Pro+] by aamirlangQuarterlytheory Candles - by aamirlang
Overview
Quarterlytheory Candles is a comprehensive multi-timeframe Smart Money Concepts (SMC) indicator designed for precision trading based on quarterly theory, institutional order flow, and advanced market structure analysis. This indicator combines Higher Timeframe (HTF) candle visualization, liquidity sweeps, market structure shifts, Fair Value Gaps (FVGs), and Smart Money Tool (SMT) divergences to provide traders with institutional-level insights.
Core Features
1. HTF Candles with Quarter-Based System
Adaptive Timeframe Selection: Automatically calculates optimal Higher Timeframe based on your chart timeframe
1m chart → 23m HTF (Q1-Q4 quarters)
5m chart → 90m HTF (Q1-Q4 quarters)
15m/60m chart → 360m/6H HTF (Asia/London/NY AM/NY PM sessions)
Daily chart → Weekly/Monthly HTF
Weekly chart → Monthly/Quarterly HTF
Visual HTF Candle Display:
Shows up to 50 HTF candles with customizable offset
Bullish/Bearish body and wick coloring
Real-time candle formation with live updates
Quarter labels (Q1, Q2, Q3, Q4) or session names (Asia, London, NY AM, NY PM)
Countdown timer showing time remaining in current HTF period
HTF Open Line: Displays the opening price of each HTF candle with customizable style
HTF Fair Value Gaps: Identifies imbalances (BISI/SIBI) on HTF candles
2. C2 Setup Detection
The cornerstone of this indicator - identifies high-probability reversal setups:
C2 Buy Signal: Occurs when HTF candle sweeps previous HTF low and closes back above it
C2 Sell Signal: Occurs when HTF candle sweeps previous HTF high and closes back below it
C2 Confirmation System:
CISD Pattern (Change In State of Delivery): Validates sweep with price reclaiming CISD level
Multi-Period Validation: Confirms setups within 2 HTF periods
C3 Box: Shows HTF open to previous HTF EQ (50% level)
C4 Setup: Secondary setup when C3 EQ is favorable relative to HTF open
Standard Deviation Levels: Automatically calculates extension targets (-1, -2, -2.5, -4, -4.5)
Visual Elements:
C2/C4 labels with transparent backgrounds
T-Spot boxes highlighting setup zones (bullish=green, bearish=red)
CISD confirmation lines
Setup invalidation tracking (XC2/XC4 labels when stop hit)
3. Current Range Tool (CRT)
Displays three critical levels from the most recently closed HTF candle:
HTF High (red dotted line)
HTF EQ/Midpoint (gray dotted line)
HTF Low (green dotted line)
These levels serve as key support/resistance and targets for current HTF period.
4. Market Structure Shifts (MSS)
Automatically detects bullish and bearish market structure breaks
Uses fractal-based swing detection (customizable period: 1-15)
Color-coded MSS lines (blue=bullish, red=bearish)
Labels mark precise MSS points
5. Fair Value Gaps (FVG)
Bullish FVGs (BISI - Buy Side Imbalance Sell Side Inefficiency): Blue zones
Bearish FVGs (SIBI - Sell Side Imbalance Buy Side Inefficiency): Red zones
Mitigation Tracking: Changes to gray when price taps the zone
Automatically manages up to 50 FVGs (configurable)
6. Confirmed HTF Swing Levels
Draws horizontal lines at confirmed swing highs/lows
Confirmation Logic: HTF candle sweeps a level AND next candle closes with rejection
Lines extend for customizable overshoot bars
Useful for identifying swept liquidity levels
7. LTF Sweep Detection
Identifies when HTF candles sweep previous HTF candle highs/lows
Draws sweep lines on main chart at swept levels
Helps visualize liquidity grabs in real-time
8. Trading Sessions & Killzones -
Highlights key institutional trading sessions:
Asia Session (18:00-00:00 NY time) - Gray
London Session (00:00-06:00 NY time) - Red
NY AM Session (06:00-12:00 NY time) - Green
NY PM Session (12:00-18:00 NY time) - Blue
Session Features:
Customizable box colors and transparency
Session high/low pivot lines
Pivot labels with optional price display
Session open lines ("True Day/Asia/London/NY Open")
Days of week labels (MON, TUE, WED, etc.)
Daily/Weekly/Monthly open lines and high/low pivots
9. Smart Money Tool (SMT) Divergences
Compares your chart with two other symbols to identify divergences:
Symbol 1 (default: TVC:DXY - US Dollar Index)
Symbol 2 (default: OANDA:GBPUSD)
10. Information Tables
Two customizable watermark tables:
Info Table: Shows ticker, LTF, HTF, countdown timer, and bias
Personal Table: Customizable inspirational message
How to Use This Indicator
Getting Started
Add to Chart: Apply indicator to your preferred timeframe (works best on 1m, 5m, 15m, 60m, Daily)
Review HTF Candles: Check the HTF candles displayed on the right side with quarter/session labels
Monitor CRT Levels: Watch the dotted High/EQ/Low lines from previous closed HTF candle
Wait for C2 Setup: Look for C2 labels appearing after HTF sweep + CISD confirmation
Trading the C2 Setup
For Long Positions (C2 Buy):
Wait for HTF candle to sweep previous HTF low (price goes below previous HTF low)
HTF candle closes back above the swept low (rejection)
CISD confirmation: Price reclaims the CISD level (blue line)
C2 label appears at the swept low
T-Spot (green box) shows optimal entry zone between HTF open and previous HTF EQ
Standard Deviation levels provide targets (-1, -2, -2.5, -4, -4.5 from CISD swing)
Stop Loss: Above C2 label level (swept low)
Invalidation: If stop hit, label changes to XC2 in red
For Short Positions (C2 Sell):
Wait for HTF candle to sweep previous HTF high (price goes above previous HTF high)
HTF candle closes back below the swept high (rejection)
CISD confirmation: Price breaks below the CISD level (blue line)
C2 label appears at the swept high
T-Spot (red box) shows optimal entry zone between HTF open and previous HTF EQ
Standard Deviation levels provide targets (-1, -2, -2.5, -4, -4.5 from CISD swing)
Stop Loss: Below C2 label level (swept high)
Invalidation: If stop hit, label changes to XC2 in red
Advanced Techniques
Using Bias Filter:
Auto: Allows both long and short setups
Bullish: Only shows long setups (filters out shorts)
Bearish: Only shows short setups (filters out longs)
Combining with Sessions:
Trade C2 setups that occur during high-volume sessions (London/NY AM)
Use session highs/lows as additional confluence
Avoid setups during low-volume periods (late NY PM/early Asia)
FVG Confluence:
Look for C2 setups that align with unfilled FVGs
Target FVGs as potential reversal zones
Use mitigated FVGs as trailing stop areas
MSS Confirmation:
Stronger setups occur after MSS in the C2 direction
Wait for bullish MSS before taking C2 long setups
Wait for bearish MSS before taking C2 short setups
SMT Divergence:
Use SMT divergences as additional confirmation
If DXY shows divergence at your C2 level = higher probability setup
Helps filter false setups and identify institutional manipulation
Risk Management
Maximum 2 HTF periods: C2 setups invalidate if stop not hit within 2 HTF candles
C4 Secondary Setup: If C3 EQ is favorable, you may get a C4 continuation setup
Std Dev Targets: Scale out at -1, -2, -2.5 levels; let runner go to -4/-4.5
Monitor CRT Levels: Previous HTF high/low often act as magnets for price
⚙️ Customization Options
HTF Candles Settings
Toggle HTF Candles display on/off
Fractal mode (uses fractal-based HTF calculation)
Number of candles to display (1-50)
Offset positioning
HTF labels with custom size and color
Body, border, and wick colors for bull/bear candles
FVG zones on HTF candles
HTF Open line style, color, width
Watermark tables (position, text customization)
General Settings
T-Spot box toggle and colors
Bias filter (Auto/Bullish/Bearish)
Market Structure markers (HH/HL/LH/LL)
Vertical lines for HTF candle open/close
CRT lines (High/Low/EQ) with color and width customization
MSS detection toggle with bull/bear colors
Fractal period (1-15)
FVG detection with bull/bear colors, mitigated color
Maximum FVGs to track (1-50)
StdDs toggle with custom levels input
Sessions and Pivots Settings
Timeframe limit (prevents display on higher TFs)
Toggle each session individually (Asia/London/NY AM/NY PM/Extra)
Custom session times and colors
Box transparency control
Session labels toggle
Session high/low pivot lines
Pivot label price display
Alert on broken pivots
D/W/M open lines
D/W/M high/low lines
Days of week labels
True session opens (custom session times for precise opens)
Line styles and widths
SMT Settings
Symbol 1 and Symbol 2 selection
Invert symbol options (for inverse correlations)
Historical data toggle
Alerts
C2 Setup Alerts (long and short)
Sweep Alerts (optional)
MSS Alerts (optional)
FVG Alerts (optional)
Broken Pivot Alerts (optional)
Label System
C2: Confirmed setup label
C4: Secondary setup label
XC2: Invalidated C2 (red if hit on HTF 1, orange if HTF 2)
XC4: Invalidated C4 (red)
MSS: Market structure shift
Q1, Q2, Q3, Q4: Quarter labels for sub-session HTF
Asia, London, NY AM, NY PM: Session labels for 6H HTF
MON, TUE, WED, etc.: Day of week labels
HH, HL, LH, LL: Market structure markers
Std Dev Labels: -1, -2, -2.5, -4, -4.5
Best Practices
For Day Traders (1m, 5m charts)
Use fractal mode for cleaner HTF calculation
Focus on London and NY AM sessions for volume
Trade C2 setups aligned with session bias
Use -1 and -2 Std Dev levels as initial targets
Monitor SMT divergences for confirmation
For Swing Traders (15m, 60m, Daily charts)
Use standard HTF mode for accurate session mapping
Focus on C2 setups at major session opens (Daily, Weekly)
Target -4 and -4.5 Std Dev levels
Use Weekly/Monthly pivots for additional confluence
Allow 2 full HTF periods for setup to play out
For All Traders
Journal your C2 setups: Track success rate, best sessions, best Std Dev targets
Use bias filter strategically: If trending strongly, filter counter-trend setups
Combine with price action: C2 is a framework, not a mechanical system
Respect CRT levels: Previous HTF high/EQ/low are magnets
Don't force trades: Quality > quantity with C2 setups
Backtest on your instrument: Every market has nuances
🔔 Alert Configuration
This indicator supports TradingView alerts:
Click "Create Alert" on TradingView
Select "Quarterlytheory Candles" as condition
Choose alert type:
"Long Trade Alert!" - Fires when C2 Buy confirmed
"Short Trade Alert!" - Fires when C2 Sell confirmed
Set "Once Per Bar Close" frequency
Customize alert actions (notification, email, webhook, sound)
Pro Tip: Use webhook alerts to connect to Discord, Telegram, or trading bots for automated notifications.
⚠️ DISCLAIMER
FOR EDUCATIONAL PURPOSES ONLY
This indicator is provided as an educational tool for learning about Smart Money Concepts, quarterly theory, and institutional order flow analysis. It is NOT financial advice.
Important Notices:
Trading involves substantial risk of loss and is not suitable for everyone
Past performance does not guarantee future results
No indicator can predict market movements with certainty
The developer (aamirlang) is not a registered financial advisor
Always use proper risk management and position sizing
Never risk more than you can afford to lose
This indicator does not guarantee profitable trades
Users are solely responsible for their trading decisions
Test thoroughly on paper/demo accounts before risking real capital
Market conditions change; what works today may not work tomorrow
Technical Disclaimer:
This indicator may repaint on unconfirmed bars (use confirmed signals only)
Higher timeframe calculations may vary slightly from standard TradingView HTF functions
Performance may vary across different instruments and market conditions
Ensure adequate chart history is loaded for accurate calculations
By using this indicator, you acknowledge:
You understand the risks of trading
You have tested this indicator thoroughly
You take full responsibility for all trading decisions
You will not hold the developer liable for any losses
🙏 CREDITS & ACKNOWLEDGMENTS
This indicator builds upon the excellent work of several open-source contributors and combines concepts from various trading methodologies. Full credit and gratitude to:
Core Concepts & Methodology
@traderdaye: I have used the Quarterly theory concepts and True opens of Daye.
@TTrades_edu: The foundational C2/C3/C4 setup structure and CISD pattern detection methodology that forms the core of this indicator
ICT (Inner Circle Trader): Smart Money Concepts framework, killzones, liquidity concepts, and FVG theory
Open Source Code Components
1. Smart Money Tool (SMT) Divergence Detection
Original Author: Algoryze
Component: SMT divergence calculation and visualization system
Contribution: Multi-symbol comparison logic, fractal-based swing detection for divergences
License: Open source (TradingView Public Library)
2. Killzones and Pivot System
Original Author: Tradeforopp
Component: Trading session boxes, pivot high/low detection, D/W/M separators and opens
Contribution: Session time management, pivot line extensions, timezone handling
License: Open source (TradingView Public Library)
Modifications & Enhancements by aamirlang
Integrated all components into unified quarterly theory framework
Developed adaptive HTF calculation system with quarter-based labeling
Created C2/C3/C4 setup detection logic with CISD confirmation
Implemented Standard Deviation target system
Built HTF candle visualization engine with custom quarter formatting
Added Current Range Tool (CRT) for previous HTF levels
Developed setup invalidation tracking system
Created custom watermark and information tables
Implemented confirmed swing detection and LTF sweep visualization
Added comprehensive alert system
Optimized performance and visual clarity
Enhanced customization options throughout
Community & Inspiration
TradingView Community: For feedback, testing, and continuous improvement suggestions
SMC Trading Community: For sharing knowledge on institutional order flow
Pine Script™ Documentation: For technical reference and best practices
Special Thanks
To all traders who have shared their experiences with quarterly theory
To the open-source trading community for fostering collaboration
To early testers who provided valuable feedback
📝 Version Information
Current Version: Fractal Edition Pro+
Indicator Name: Quarterlytheory Candles by aamirlang
Pine Script™ Version: 5
Last Updated: 2026
Compatibility: TradingView Free, Pro, Pro+, Premium plans
📧 Contact & Support
For questions, suggestions, or to report issues:
Before reaching out:
Read this description thoroughly
Check indicator settings and tooltips
Test on demo account first
Review TradingView's Pine Script™ documentation
🔄 Future Development
Potential enhancements under consideration:
Multi-timeframe dashboard view
Custom alert message templates
Volume profile integration
Enhanced session statistics table
Liquidity heatmap visualization
Trade journal integration
C2 Setup analysis and statistics
Auto Bias detection and implementation
Auto SSMT and SMT
PSP Detection
Feature requests are welcome via TradingView comments section.
📜 License
This indicator combines original code by aamirlang with modified open-source components from Algoryze (SMT) and Tradeforopp (Killzones/Pivots).
This indicator is shared for educational purposes. Redistribution or resale of this indicator or its components without proper attribution is prohibited.
Индикатор Pine Script®






















