OPEN-SOURCE SCRIPT

Math by Thomas SMC Swing Range + Premium/Discount Zones

4โ€ฏ891
Description:
"Math by Thomas โ€“ SMC Swing Range + Premium/Discount Zones" is a Smart Money Concepts (SMC) based indicator designed to help traders visually understand market structure and value zones.

This tool automatically detects and marks:

๐Ÿ”บ Recent Swing Highs and Lows

๐ŸŸง Midpoint Line between swing high and low

๐ŸŸฅ๐ŸŸฉ Premium/Discount Zones for value-based entries

๐Ÿ”ค HH, HL, LH, LL Labels to identify trend structure

๐Ÿ” BoS (Break of Structure) and CHoCH (Change of Character) confirmations

Built with Pine Script v6, this indicator is optimized for both intraday and positional traders who rely on structure-based decision-making.

๐Ÿ› ๏ธ How to Use:
Apply to any chart โ€“ Works on all timeframes and instruments.

Swing High/Low Detection:

Uses pivot logic with adjustable strength to find recent key turning points.

Displays shaded horizontal boxes for visual clarity.

Midpoint Line:

Automatically drawn between the last high and low.

Acts as the fair value level for identifying overbought/oversold zones.

Premium/Discount Zones:

Above midpoint = Premium (consider shorting).

Below midpoint = Discount (consider buying).

Structure Labels:

HH (Higher High), HL (Higher Low), LH (Lower High), LL (Lower Low).

Color-coded to reflect bullish or bearish trends.

BoS & CHoCH:

Structural breaks are labeled automatically to signal possible trend continuation or reversal.

โš™๏ธ Settings:
๐ŸŽฏ Pivot Strength โ€“ Adjusts how far back/forward candles must confirm a swing.

โœ… Toggle visibility of:

Swing Lines

Labels

BoS / CHoCH

Premium / Discount zones

๐ŸŽจ Customize colors for each visual component.

๐Ÿง  Best Practices:
Use in combination with Order Blocks, Fair Value Gaps, or Volume Imbalances.

Ideal for traders applying Smart Money Concepts (SMC) with a structure-first mindset.

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.