OPEN-SOURCE SCRIPT

4H Candle Curves

366
4H Candle Curves - Detailed User Guide

OVERVIEW
This indicator reveals curve vs continuation behavior in NQ Futures by analyzing how price responds after breaking the first-hour range. Based on 10+ years of statistical analysis (2013-2025, 3,136+ trading days), it identifies which 4-hour sessions exhibit mean reversion (curve) behavior versus trend continuation when Q2 (second hour) breaks Q1 (first hour) extremes.

⚠️ IMPORTANT: This indicator is specifically designed for NQ FUTURES ONLY. All curve probabilities and statistics were derived from a decade-long dataset of NQ 1-minute bars. Using this on other instruments will produce inaccurate results.

CORE CONCEPT: THE CURVE
What is a "Curve"?
A curve occurs when price breaks out of the first hour's range in Q2 (hour 2), but then reverses direction in the second half (Q3+Q4) to make a new extreme on the opposite side.
Curve Example (Upside Break → Downside Reversal):

Q1 (Hour 1): Price establishes range 25,000 - 25,050
Q2 (Hour 2): Price breaks ABOVE Q1 high, reaches 25,100
Q3+Q4 (Hours 3-4): Price curves back down, makes new LOW below 25,000

Result: Q2 broke high, but second half curved back to make new low below Q1 = CURVE
What is "Continuation"?
Continuation occurs when Q2 breaks Q1 range and the second half extends further in the same direction.
Continuation Example (Upside Break → Further Upside):

Q1 (Hour 1): Price establishes range 25,000 - 25,050
Q2 (Hour 2): Price breaks ABOVE Q1 high, reaches 25,100
Q3+Q4 (Hours 3-4): Price continues higher, makes new HIGH above 25,100

Result: Q2 broke high, second half made new high above Q2 = CONTINUATION

THE CRITICAL DISCOVERY: 6AM IS THE CURVE SESSION
Curve Probabilities by Session:
When Q2 Breaks Q1 HIGH:

6AM: 60.6% curve (new low below Q1) | 38.5% continuation
2AM: 38.4% curve | 46.7% continuation (balanced)
10AM: 17.2% curve | 60.4% continuation ← STRONG continuation bias
6PM: 29.6% curve | 59.0% continuation
10PM: 27.5% curve | 55.1% continuation

When Q2 Breaks Q1 LOW:

6AM: 64.4% curve (new high above Q1) | 35.0% continuation ← HIGHEST curve
2AM: 42.8% curve | 43.3% continuation (balanced)
10AM: 16.7% curve | 51.6% continuation ← STRONG continuation bias
6PM: 33.7% curve | 51.1% continuation
10PM: 33.1% curve | 48.6% continuation

Key Insight:
6AM is THE ONLY SESSION with >60% curve probability in both directions. This makes it a uniquely exploitable mean reversion session. When Q2 breaks Q1 range during 6AM, expect the second half to curve back 60-64% of the time.
10AM shows the opposite: Strong continuation bias (60% when Q2 breaks high, 52% when Q2 breaks low). 10AM breakouts tend to follow through.

HOW IT WORKS: THE QUARTER SYSTEM
The Six 4-Hour Candles (EST):
Each trading day (6pm-5pm) is divided into six 4-hour periods:

6PM (18:00-22:00) - Evening/Globex open | Blue box
10PM (22:00-02:00) - Asia session | Purple box
2AM (02:00-06:00) - Early London | Orange box
6AM (06:00-10:00) - Late London + NY Open | Green box ← THE CURVE SESSION
10AM (10:00-14:00) - NY Morning | Red box ← THE CONTINUATION SESSION
2PM (14:00-17:00) - NY Afternoon | Yellow box (3 hours only)

The Four Quarters:
Each 4-hour candle (except 2PM) is divided into four 1-hour quarters:

Q1 (Hour 1, minutes 0-60): Establishes initial range
Q2 (Hour 2, minutes 60-120): Tests Q1 range - breaks or holds?
Q3 (Hour 3, minutes 120-180): Second half begins
Q4 (Hour 4, minutes 180-240): Second half completes

2PM candle only has 3 hours (14:00-17:00), so quarters are adjusted accordingly.

The Three-Step Analysis:
STEP 1: Q1 Establishes Range
The first hour sets the high and low for the session. This becomes the reference range.
STEP 2: Q2 Break Detection
The indicator monitors whether Q2 (hour 2) breaks above Q1 high or below Q1 low.
STEP 3: Second Half Response
Once Q2 breaks Q1 range, the indicator tracks what happens in Q3+Q4:

Does price CURVE back to make new extreme on opposite side?
Does price CONTINUE to make new extreme in same direction?
Or does price stay within the established range?


VISUAL ELEMENTS EXPLAINED
1. 4-Hour Candle Boxes
Colored boxes display the high-to-low range of each 4H candle:

Blue = 6PM (evening session start)
Purple = 10PM (Asia session)
Orange = 2AM (early London)
Green = 6AM ← THE CURVE SESSION (watch for mean reversion)
Red = 10AM ← THE CONTINUATION SESSION (trend follow-through)
Yellow = 2PM (afternoon close, 3 hours only)

2. Quarter Separator Lines
Vertical dotted lines mark the boundaries between quarters (1H, 2H, 3H marks). This helps you see:

When Q1 ends (after 1 hour)
When Q2 ends / second half begins (after 2 hours)
When Q3 ends (after 3 hours)

3. Candle Name Labels
At the 2-hour mark (Q2/Q3 boundary), a label shows:

Candle name (e.g., "6am")
Directional indicator:

🔼 = Q2 broke Q1 HIGH
🔽 = Q2 broke Q1 LOW
⚠️ = Q2 broke BOTH Q1 high and low (extended range)
No symbol = Q2 stayed within Q1 range

THE LIVE STATUS TABLE
Located in your chosen corner (default: bottom-right), this table shows real-time analysis of the current 4H candle.
Header Row:
"LIVE: [CANDLE] CANDLE" - Shows which 4H session you're currently in
Quarter Row:
"Quarter: Q1/Q2/Q3/Q4 (Hour X)" - Shows which quarter you're currently forming
STATUS Section:
The status updates dynamically based on what has happened:
During Q1-Q2 (First Half):

"⏳ Q1 Building..." - First hour forming, range being established
"⏳ Q2 Building..." - Second hour in progress, Q2 within Q1 range so far
"🔼 Q2 Broke Q1 HIGH" - Q2 has broken above Q1 high
"🔽 Q2 Broke Q1 LOW" - Q2 has broken below Q1 low
"⚠️ Q2 Broke BOTH Q1 Extremes" - Q2 extended range in both directions

During Q3-Q4 (Second Half):

"✓ CURVE CONFIRMED" - Q2 broke one direction, second half reversed to opposite side
"✓ CONTINUATION CONFIRMED" - Q2 broke one direction, second half extended further same direction
"⏳ 2nd Half In Progress" - Q2 broke Q1, waiting to see if curve or continuation
"📊 No Q2 Break Occurred" - Q2 stayed within Q1 range (no curve/continuation setup)

EXPECTATION Section:
Shows the probabilities based on the current state:
When Q2 breaks Q1 high in 6AM:
EXPECT 2nd half:
CURVE (low < Q1): 60.6%
CONT (high > Q2): 38.5%
This tells you there's a 60.6% chance the second half will curve back to make a new low below Q1, versus 38.5% chance it continues higher above Q2.
When curve/continuation is confirmed:
Q2 broke high → 2nd half made new LOW below Q1
Curve: 60.6%
Shows what actually happened and the historical probability.

Color Coding:
Purple background = Curve confirmed (mean reversion occurred)
Green background = Continuation confirmed (upside extension)
Red background = Continuation confirmed (downside extension)
Blue background = Second half in progress, watching
Yellow background = No Q2 break (no setup)
Gray background = Still in first half, building


THE CURVE REFERENCE TABLE
Located in your chosen corner (default: bottom-left), this table provides a quick reference for all sessions.
Table Structure:
TOP SECTION: "When Q2 BREAKS Q1 HIGH"
BOTTOM SECTION: "When Q2 BREAKS Q1 LOW"

How to Read:

"Curve" column = % of time second half makes new extreme on OPPOSITE side
"Cont" column = % of time second half makes new extreme in SAME direction
"Winner" column = Which behavior is more likely
Purple highlight = Curve is the winner (higher %)
Blue highlight = Continuation is the winner
🔥 symbol = Strong edge (>60%)

Quick Reference Usage:
You're in 10AM session, Q2 just broke Q1 high. Look at top section, 10AM row:

Curve: 17.2%
Cont: 60.4%
Winner: CONT

Interpretation: 10AM breakouts tend to follow through. Only 17% chance of curving back. Trade with the break, not against it.

PRACTICAL TRADING EXAMPLES
Example 1: Perfect 6AM Curve Setup
Scenario:

6AM candle in progress
7:00 AM: Q1 ends, range is 18,000 - 18,050
7:30 AM: Price breaks above 18,050, reaches 18,075 (Q2 broke Q1 high)
Live table shows: "🔼 Q2 Broke Q1 HIGH"
Expectation: "CURVE (low < Q1): 60.6%"

Trading Decision:
Even though price broke to new highs, the 60.6% curve probability suggests looking for short opportunities expecting price to curve back below 18,000 in Q3-Q4.
Typical Outcome:
8:15 AM (Q3): Price starts declining
9:15 AM (Q4): Price makes new low at 17,990
Result: ✓ CURVE CONFIRMED

Example 2: 10AM Continuation Signal
Scenario:

10AM candle in progress
11:00 AM: Q1 ends, range is 18,100 - 18,150
11:45 AM: Price breaks above 18,150, reaches 18,180 (Q2 broke Q1 high)
Live table shows: "🔼 Q2 Broke Q1 HIGH"
Expectation: "CONT (high > Q2): 60.4%"

Trading Decision:
With 60.4% continuation probability, breakout likely to follow through. Look for long opportunities expecting extension above 18,180 in Q3-Q4.
Typical Outcome:
12:30 PM (Q3): Price continues higher to 18,200
1:15 PM (Q4): Price makes new high at 18,225
Result: ✓ CONTINUATION CONFIRMED

Example 3: Using Reference Table During Live Trading
You see Q2 breaking Q1 low during 2AM session:
Quick reference check:

2AM row, "When Q2 BREAKS Q1 LOW" section
Curve: 42.8% | Cont: 43.3% | Winner: Balanced

Interpretation: This is a coin flip - 2AM session is balanced when Q2 breaks low. Don't force a directional bias. Wait for second half price action confirmation or skip the setup.

Example 4: No Setup Scenario
Scenario:

6AM candle, Q2 ends at 8:00 AM
Q2 stayed within Q1 range (no break above or below)
Live table shows: "📊 No Q2 Break Occurred"

Trading Decision:
No curve/continuation setup exists. This analysis only applies when Q2 breaks Q1 range. Monitor for different strategies or wait for next 4H candle.

UNDERSTANDING THE UNDERLYING METHODOLOGY
Data Foundation:

Instrument: NQ Futures (E-mini NASDAQ-100)
Timeframe: 1-minute bars for precise quarter tracking
Period: January 2013 - December 2025
Sample: 3,136+ complete trading days
Total 4H Candles Analyzed: ~18,800+ individual sessions

Analysis Process:
For each 4H candle in the dataset:

Calculate Q1 high and low (first hour range)
Track whether Q2 breaks Q1 high, Q1 low, both, or neither
When Q2 breaks Q1 range, measure second half response:

Did Q3+Q4 make new low below Q1? (curve when Q2 broke high)
Did Q3+Q4 make new high above Q1? (curve when Q2 broke low)
Did Q3+Q4 make new high above Q2? (continuation when Q2 broke high)
Did Q3+Q4 make new low below Q2? (continuation when Q2 broke low)


Calculate percentages for each session

Why NQ-Specific?
Different futures contracts exhibit different intraday personality:
NQ (NASDAQ):

Tech-heavy, volatility-prone
6AM shows extreme curve behavior (60-64%) due to NY Open reversal tendency
10AM shows strong continuation (60%) as trends establish

ES (S&P 500) would show different probabilities because:

Lower volatility than NQ
Different institutional participation patterns
Different response to macro events

The indicator's probabilities are calibrated specifically to NQ behavior patterns. Using it on ES, RTY, or other instruments will produce misleading signals.

ORIGINALITY & INNOVATION
What Makes This Indicator Unique:

Quarter-Based Curve Analysis: Unlike traditional indicators that only identify breakouts, this tracks what happens after the breakout. The curve vs continuation framework is novel and provides directional edge.

Session-Specific Behavior: Recognizes that 6AM behaves fundamentally differently than 10AM. Most indicators apply the same logic across all sessions. This indicator provides session-specific probabilities.

Statistical Validation: Every probability shown is backed by 10+ years of data (2,900+ candles per session). Not based on theory or discretionary observation.

Real-Time Quarter Tracking: Precisely identifies which quarter you're in and what stage of the pattern is forming. Provides forward-looking probabilities based on current state.

The 6AM Discovery: The 60-64% curve probability in 6AM is a quantified, repeatable edge that contradicts traditional "breakout = continuation" assumptions. This session exhibits mean reversion characteristics that most traders miss.

Dual-Direction Analysis: Tracks both upside breaks (Q2 > Q1 high) and downside breaks (Q2 < Q1 low) separately, as they can have different probabilities.

Visual Quarter System: The combination of colored boxes, quarter separators, and real-time labels provides instant visual understanding of pattern stage and expected behavior.


HOW TO USE THIS INDICATOR
Step 1: Identify Current 4H Candle
Check which colored box you're in and what session it represents.
Step 2: Wait for Q2 to Complete
The setup doesn't exist until Q2 (hour 2) breaks Q1 range. Monitor the live table.
Step 3: Check Q2 Break Status
Did Q2 break Q1 high? Q1 low? Both? Or neither?
Step 4: Consult Reference Table
Look up current session in curve reference table. What's the probability?
Step 5: Apply Session-Specific Strategy
For 6AM (60-64% curve):

Q2 breaks high → Expect curve back for new low
Q2 breaks low → Expect curve back for new high
Strategy: FADE the Q2 break, look for reversal entries in Q3-Q4

For 10AM (52-60% continuation):

Q2 breaks high → Expect continuation higher
Q2 breaks low → Expect continuation lower
Strategy: TRADE WITH the Q2 break, look for continuation entries in Q3-Q4

For 2AM (38-43% curve, 43-47% continuation):

Balanced probabilities
Strategy: Wait for Q3 price action to confirm direction, or skip

For 6PM/10PM (50-59% continuation):

Moderate continuation bias
Strategy: Lean with the break but use tight stops

Step 6: Monitor Live Status
Watch the live table for confirmation:

"✓ CURVE CONFIRMED" = Mean reversion occurred
"✓ CONTINUATION CONFIRMED" = Follow-through occurred
"⏳ 2nd Half In Progress" = Still developing


BEST PRACTICES

Focus on 6AM for curve trades - This is THE high-probability mean reversion session
Focus on 10AM for continuation trades - This is THE high-probability breakout session
Be cautious with 2AM - Balanced probabilities mean lower edge
Use quarter separators - Enter trades early in Q3 after Q2 break, don't wait for Q4
Combine with price action - Don't blindly fade 6AM or follow 10AM; wait for confirming price structure
Respect the 60% rule - 6AM curve happens 60% of time, which means 40% it doesn't. Manage risk accordingly
Watch for "No Q2 Break" - If Q2 doesn't break Q1, this analysis doesn't apply
Consider overnight context - If 6AM opens with huge gap, curve probability may be affected


SETTINGS & CUSTOMIZATION
Display Settings:

Show 4H Candle Boxes - Toggle colored range boxes
Box Colors - Customize color for each session
Show Quarter Separators - Show/hide 1H, 2H, 3H lines
Show Candle Name Labels - Show/hide session labels at 2H mark
Separator Line Style - Solid/Dashed/Dotted
Max Historical Candles - How many past 4H candles to display (1-50)

Table Settings:

Show Live Status Table - Toggle real-time analysis table
Show Curve Reference Table - Toggle probability reference table
Table Positions - Place tables in any corner
Table Text Size - Tiny/Small/Normal

LIMITATIONS & DISCLAIMERS

NQ FUTURES ONLY - All probabilities are NQ-specific, do not use on other instruments
Requires Q2 break - No curve/continuation setup exists if Q2 stays within Q1 range
Probabilities, not certainties - 60% means it happens 6 out of 10 times, not every time
Lower timeframe noise - 1-minute tracking can be choppy, consider using 5min+ for entries
Gap days - Large overnight gaps may affect curve/continuation probabilities
Not standalone - Use as confluence with your strategy, not as sole decision factor
Historical performance - Past statistics don't guarantee future results


WHY THE CURVE CONCEPT MATTERS
Traditional trading wisdom says: "Breakout = Continuation"
This indicator proves that's not always true. Specifically, during the 6AM session (late London + NY Open), when Q2 breaks the Q1 range, price curves back to the opposite extreme 60-64% of the time.
This creates a unique exploitable edge:

Most breakout traders go LONG when Q2 breaks Q1 high
But in 6AM, 60.6% of the time, price curves back down for new low
Shorting the breakout (counter-intuitive) is the higher-probability trade

The 10AM session shows the opposite:

Breakouts in 10AM tend to follow through (52-60%)
Traditional "trade the breakout" strategy works better here

By knowing which session you're in, you can adapt your strategy to match the session's personality.

FINAL NOTES
This indicator distills 10+ years of NQ intraday behavior into actionable, session-specific probabilities. The discovery that 6AM exhibits 60-64% curve behavior while 10AM exhibits 52-60% continuation behavior provides a statistical edge for mean reversion and trend-following traders respectively.
The highest-probability setups:

6AM Q2 break → FADE (60-64% edge for curve)
10AM Q2 break → FOLLOW (52-60% edge for continuation)
2AM = SKIP (balanced probabilities, no clear edge)

Master the 6AM curve and 10AM continuation first. These two sessions provide the clearest statistical edges.

Remember: Trade with proper risk management. This tool provides probabilities based on historical behavior, not predictions of future performance.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.