OPEN-SOURCE SCRIPT

BRAYITAN S/R Horizontal

2 279
BRAYITAN S/R Horizontal — Indicator Description
This is a multi-timeframe Support & Resistance indicator for TradingView, written in Pine Script v5. Here's a full breakdown:

What It Does
It automatically detects and draws horizontal support and resistance lines based on pivot highs and lows from two configurable timeframes (default: M5 and M15), directly on your chart regardless of which timeframe you're currently viewing.

Core Features
Pivot Detection
It uses ta.pivothigh and ta.pivotlow with configurable left/right bar lookback to identify significant price turning points on each timeframe via request.security.
Duplicate Filtering
Before storing a new pivot, it checks whether a level already exists within 0.05% proximity — preventing near-identical lines from cluttering the chart.
Touch Counting
Every bar, the script scans all stored levels and increments a touch counter whenever price (high or low) comes within a user-defined tolerance (default 0.1%) of any level. This measures how many times price has respected a level.
Dynamic Line Thickness
Lines automatically thicken based on touch count — 3+ touches adds 1px, 5+ touches adds 2px — visually highlighting the strongest levels.
Strength Symbols
Labels show ⚡ for levels touched 3+ times and 🔥 for 5+ times.

Visuals

Draws up to N lines per timeframe (default 5 each), projected forward on the chart
Labels show: timeframe tag (S/M5, R/M15, etc.), price, touch count, and strength emoji
Fully customizable colors, line style (solid/dotted/dashed), and thickness per timeframe
Background color flashes when price approaches any S/R level (blue for M5, orange for M15)


Alerts
Four alert conditions are built in:
AlertTriggerResistance M5 reachedClose within 0.3% of M5 pivot highSupport M5 reachedClose within 0.3% of M5 pivot lowResistance M15 reachedClose within 0.3% of M15 pivot highSupport M15 reachedClose within 0.3% of M15 pivot low

Practical Use Case
Ideal for scalpers and intraday traders who want to see higher-timeframe (M15) key levels layered over a lower-timeframe (M5) chart, with visual cues about which levels have been tested most — helping prioritize trade entries, stops, and targets around the strongest zones.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.