OPEN-SOURCE SCRIPT

Fractal Model (TTrades)

248
Fractal Model - Higher Timeframe Analysis with TTFM Labeling

A higher timeframe candle visualization tool enhanced with TTFM (The Fractal Model) labeling system for pivot-based price action analysis, made popular by Youtuber TTrades

What This Script Does:

This indicator displays higher timeframe candles on your current chart and identifies key pivot formations using the TTFM labeling system. It helps traders understand market structure and potential reversal points through systematic pivot analysis.

Key Features:

  • Higher Timeframe Visualization: Shows HTF candles without switching timeframes
  • TTFM Labeling System: Identifies pivot components with C2, C3, and C4 labels
  • T-Spot Detection: Marks areas where price is likely to form wicks based on pivot logic
  • Sweep Confirmation: Detects when price sweeps previous levels but closes opposite
  • Fair Value Gap Detection: Identifies imbalance zones between candle ranges
  • Alert System: Sends alerts when T-spot formations are confirmed using pivot logic
  • Silver T-Spot Alerts: Special alerts during specific market hours


How TTFM Labeling Works:

The TTFM system labels pivot formations based on their structure:
  • C2: The candle that "sticks out" - the initial move that creates the pivot
  • C3 / C4: The distribution candle that continues the reversal (standard pivots)


Alert System:

The indicator provides alerts when:
  • T-spot formations are created and confirmed
  • Price sweeps tspot levels with proper confirmation (This signal tries to alert you when a potential wick has formed in the tspot location
  • Silver T-spot patterns occur during specific market hours
  • T-spot sweep confirmations are triggered


Practical Usage:

  • Add the indicator to your chart
  • Watch for T-spot formations (highlighted zones)
  • Look for C2, C3, C4 labels to understand pivot structure
  • Use sweep confirmations for entry timing
  • Set up alerts for T-spot confirmations and sweeps


Technical Implementation:

Logarithmic Midpoint Calculation:
The T-spot levels are calculated using logarithmic midpoint analysis:
  • Log Values: log_high = ln(high), log_low = ln(low), log_open = ln(open), log_close = ln(close)
  • Wick Analysis: upper_wick = log_high - max(log_open, log_close), lower_wick = min(log_open, log_close) - log_low
  • Body Size: body_size = |log_close - log_open|
  • Midpoint Logic: If max(upper_wick, lower_wick) > body_size, use wick-based midpoint; otherwise use (log_high + log_low)/2
  • Final Level: T-spot level = exp(log_mid_level)


T-Spot Formation Conditions:
  • Standard Bearish: last_closed.h > prev_closed.h AND last_closed.c < prev_closed.h
  • Standard Bullish: last_closed.l < prev_closed.l AND last_closed.c > prev_closed.l
  • Expansive Bearish: prev_closed.h > prev_prev_closed.h AND last_closed.c < max(prev_closed.o, prev_closed.c)
  • Expansive Bullish: prev_closed.l < prev_prev_closed.l AND last_closed.c > min(prev_closed.o, prev_closed.c)
  • Pro-trend Bearish: last_closed.h > mid_level AND last_closed.h < prev_closed.o AND last_closed.c < prev_closed.l
  • Pro-trend Bullish: last_closed.l < mid_level AND last_closed.l > prev_closed.o AND last_closed.c > prev_closed.h


Sweep Confirmation Logic:
  • Pivot Detection: Uses ta.pivothigh(high, 1, 2) and ta.pivotlow(low, 1, 2)
  • Touch Detection: Price must touch T-spot level (high > level OR open > level) AND close opposite
  • Confirmation Requirements: Pivot must form before touch, close must break beyond pivot level
  • Alert Trigger: Sweep confirmed when all conditions are met


Silver T-Spot Conditions:
Special T-spots during specific market hours (4th-5th candle of day or 4th candle after 1PM ET) with additional confirmation requirements.

HTF Auto-Detection:
Automatically selects appropriate higher timeframes: 1m→15m, 3m→30m, 5m→1h, 15m→4h, 30m-1h→1D, 4h-8h→1W, 1D→1M.

Based on HTF Candles by Fadi, enhanced with T-spot detection, sweep logic, TTFM labeling system, and comprehensive alert functionality.

Note: This tool is for educational purposes and should be used in conjunction with proper risk management and market analysis.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.