Atualizado

[MAD] Support / Resistance

Get this and other exclusive indicators in Premium selection

This indicator is part of djmad's Paid Space. Subscribe for $19.00/month to use it on your charts along with the author's other exclusive indicators. You pay right on TradingView and get access straight away.

Explore Premium selection
1. OVERVIEW

This indicator is designed to help traders visualize support and resistance levels across multiple timeframes simultaneously via usage of horizontal Support & Resistance Lines.
Rather than switching between different charts or cluttering your workspace with multiple indicators, this tool consolidates Bollinger Bands, Moving Averages (both Simple and Exponential), Pivot Points, and key Open/High/Low/Close levels into a single, highly customizable display.

Instead of looking at an chart like this here (all plotting's and indicators enabled):
snapshot
its usually preferred from traders to look at something more clean like this setup here, with still all the information needed available:
snapshot
The core concept revolves around the idea that significant price levels from higher timeframes often act as support or resistance on lower timeframes.
By overlaying these levels on your working chart, you can quickly identify where institutional traders, swing traders, and long-term investors might be making decisions.
For instance, a daily trader can see where weekly pivot points align with daily Bollinger Bands, creating confluence zones that often produce strong reactions.

The indicator offers in sum seven different modable Bollinger Band timeframes, allowing you to track volatility expansion and contraction across multiple periods. Each band displays the full range of standard deviations (±1σ, ±2σ, ±3σ) plus the basis line, giving you a complete picture of where price stands relative to recent volatility.

Moving averages are organized into three customizable timeframe groups for both SMAs and EMAs, with the classic periods of 20, 50, 100, and 200 available in each group. These can be displayed as horizontal levels showing where key moving averages currently sit, or plotted as continuous lines using the Multiplot feature. This flexibility means you can track long-term trend indicators while day trading, or quickly reference multiple timeframe moving averages without switching charts.

Pivot Points are calculated using either Traditional or Fibonacci methods across four timeframe levels - typically Daily, Weekly, Monthly, and Yearly. These mathematical levels have been used by floor traders for decades and continue to provide reliable reference points where price often hesitates, reverses, or accelerates through.

The OHLC (Open/High/Low/Close) feature displays the opening prices and high/low ranges from various timeframes. These levels are particularly valuable because they represent psychological reference points - traders often watch to see if price can break above yesterday's high, hold above the weekly open, or reclaim the monthly low. The indicator includes both current period and previous period levels, plus a special Monday High/Low feature for traders who use the first day of the week as a key reference.

One of the indicator's most practical features is the plot limitation system. When enabled, you can filter which levels display based on their distance from current price. For example, setting a 10% limit means you'll only see support and resistance levels within 10% of current price, dramatically reducing visual clutter while keeping the most relevant levels visible. This is especially useful when you have many timeframes enabled but want to focus on near-term trading opportunities.

The Multiplot feature solves a common TradingView limitation. Since the platform restricts each indicator to 32 colored data streams, this tool uses a clever numbering system that allows you to select exactly which moving averages you want plotted as continuous lines.
snapshot
Each SMA and EMA has a unique ID number based on its timeframe group and period, so you can choose to plot, say, the Daily 50 SMA and Weekly 200 SMA together, even though they come from different settings groups. snapshot

Labels are dynamically positioned and colored based on line thickness. Thicker lines (typically representing more important, higher timeframe levels) automatically receive more prominent label colors and greater spacing from the chart edge. This creates a natural visual hierarchy without manual adjustment. snapshot

It's worth noting that this indicator is intentionally feature-rich, but that doesn't mean you should enable everything at once. snapshot
The design philosophy is to provide comprehensive tools for various trading styles - whether you're scalping on 5-minute charts, swing trading on daily charts, or analyzing weekly timeframes for position trades. Start by enabling only the indicators relevant to your strategy, then gradually add others as needed. The horizontal line display combined with plot limitation helps manage complexity, letting you see many timeframes without overwhelming the chart.

The indicator respects TradingView's data integrity by using proper lookahead settings, ensuring that pivot points and other calculations don't peek into future data. All levels are calculated from confirmed, closed candles, making the indicator suitable for both historical analysis and live trading without repainting concerns.

2. GLOBAL SWITCHES
Master switches control entire indicator groups:
  • Show PIVOTS: Toggle all pivot point displays
  • Show Bollinger Bands: Toggle all Bollinger Band displays
  • Show SMAs: Toggle all Simple Moving Average displays
  • Show EMAs: Toggle all Exponential Moving Average displays
  • Show Open/Close/High/Lows: Toggle all OHLC line displays
  • Horizon plot masterswitch: Enable/disable horizontal line visualization

Plot Limitation:
Control which lines display based on distance from current price:
  • Limit horizon plot by following %: Enable percentage-based filtering
  • Show Resistance in X% distance: Only show resistance within X% above price (default: 10%)
  • Show Supports in X% distance: Only show support within X% below price (default: 10%)

3. BOLLINGER BANDS
Supports up to 7 Bollinger Band timeframes. Each displays 7 levels: ±3σ, ±2σ, ±1σ, and Basis.
Global Setting:
  • Bollingers Length: Calculation period for all Bollinger Bands (default: 20)

Per-Timeframe Settings:
Each Bollinger group (1-7) includes:
  • TimeFrame: Select from Live, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, D, 2D, 3D, W, 2W, 3W, M, Y
  • Show Level: Enable/disable horizontal lines
  • Line width: Thickness (1-4)
  • Show Plot: Enable continuous plot lines (Bollinger 1-3 only)
  • Plot width: Plot line thickness
  • Colors: Individual colors for each of the 7 levels

Default Timeframes: 6h, D, 2D, 3D, W, 2W, 3W
4. MOVING AVERAGES (SMA & EMA)
Both SMA and EMA follow the same structure: 3 timeframe groups, each with 4 periods (20, 50, 100, 200).
Global Settings:
Customize the period length for each MA:
  • Custom Length SMA/EMA 20: Default: 20
  • Custom Length SMA/EMA 50: Default: 50
  • Custom Length SMA/EMA 100: Default: 100
  • Custom Length SMA/EMA 200: Default: 200

Timeframe Groups:
  • SMA/EMA 1h: Timeframe 1 (default: 1h)
  • SMA/EMA 1D: Timeframe 2 (default: D)
  • SMA/EMA 1W: Timeframe 3 (default: W)

Per-Group Settings:
  • TimeFrame: Select desired timeframe
  • Show SMAs/EMAs: Master switch for this group
  • Width: Line thickness (default: 1 for hourly, 2 for daily, 3 for weekly)
  • Show 20/50/100/200: Individual toggles for each period
  • Colors: Individual color for each period

5. PIVOT POINTS
Calculates pivot points across 4 timeframes using Traditional or Fibonacci methods.
Pivot Type:
  • Traditional: Standard pivot calculation using (H+L+C)/3 with arithmetic progressions
  • Fibonacci: Uses 0.382, 0.618, and 1.0 Fibonacci ratios for support/resistance levels

Timeframe Groups:
  • Pivots Daily: Default: D, Width: 1, Color: maroon
  • Pivots Weekly: Default: W, Width: 2, Color: blue
  • Pivots Monthly: Default: M, Width: 3, Color: white
  • Pivots Yearly: Default: Y, Width: 4, Color: fuchsia

Each timeframe displays 7 levels: R3, R2, R1, P (Pivot), S1, S2, S3
Per-Timeframe Settings:
  • TimeFrame: Select desired timeframe
  • Show Pivots: Enable/disable this timeframe
  • Width: Line thickness
  • Colors: Individual colors for each of the 7 pivot levels

6. OPEN/HIGH/LOW/CLOSE LEVELS
Displays current and previous period Open, High, and Low levels for Daily, Weekly, Monthly, and Yearly timeframes.
Common Settings:
  • Show Tails: Extend lines to the right
  • Show Lead: Project lines forward
  • Line-Style: Solid, Dotted, or Dashed
  • Label-Size: Tiny, Small, Normal, Large, or Huge
  • Mastercolor: Optional color override for all OHLC lines

Available Levels:
  • Daily, Weekly, Monthly, Yearly Opens (current and previous)
  • Daily, Weekly, Monthly, Yearly Highs/Lows (current and previous)
  • Monday High/Low (special level for weekly strategies)

Per-Level Settings:
Each level can be individually enabled, colored, labeled, and have its line width adjusted.
Note: OHLC lines only display on appropriate timeframes (e.g., daily opens only on intraday charts).

7. MULTIPLOT FEATURE
The Multiplot feature allows continuous line plotting of selected indicators, bypassing TradingView's 32 data stream limitation.
How It Works:
Each SMA and EMA has a unique ID number based on its timeframe group and period. You select which indicators to plot by entering their ID numbers in the Multiplot slots (1-10).
Finding Multiplot IDs:
The ID number is derived from the indicator's position in the settings groups:
Numbering System:
  • SMA 1h group (Multiplot 01-04): IDs 1-4
  • SMA 1D group (Multiplot 05-08): IDs 5-8
  • SMA 1W group (Multiplot 09-12): IDs 9-12
  • EMA 1h group (Multiplot 13-16): IDs 13-16
  • EMA 1D group (Multiplot 17-20): IDs 17-20
  • EMA 1W group (Multiplot 21-24): IDs 21-24

Within each group:
  • First ID = MA 20
  • Second ID = MA 50
  • Third ID = MA 100
  • Fourth ID = MA 200

Examples:
  • ID 5 = SMA 1D 20 (Group "SMA 1D - Multiplot 05-08", first position)
  • ID 10 = SMA 1W 50 (Group "SMA 1W - Multiplot 09-12", second position)
  • ID 18 = EMA 1D 50 (Group "EMA 1D - Multiplot 17-20", second position)
  • ID 24 = EMA 1W 200 (Group "EMA 1W - Multiplot 21-24", fourth position)

Multiplot Settings:
Each slot (1-10) includes:
  • Enable: Activate this multiplot slot
  • Chartselect: Enter the ID number (1-24)
  • Width: Line thickness

Example Configuration:
To plot Daily SMA 20, 50, 200 and Weekly SMA 50:
  • Multiplot 1: Enable ✓, Chartselect = 5, Width = 2
  • Multiplot 2: Enable ✓, Chartselect = 6, Width = 2
  • Multiplot 3: Enable ✓, Chartselect = 8, Width = 2
  • Multiplot 4: Enable ✓, Chartselect = 10, Width = 3

Important Notes:
  • Colors automatically sync with the MA group settings
  • The corresponding timeframe group must be enabled
  • Multiplot shows continuous lines; horizon plot shows static levels

8. DYNAMIC LABELS
Labels automatically adjust position and color based on line thickness.
Text Configuration:
  • Naming Prefixes: Set custom prefixes (BB, PV, SMA, EMA)
  • Label-Size: Global size setting
  • Overide Weight-Color: When enabled, labels match line colors

Dynamic Color System:
When "Overide Weight-Color" is disabled, label colors change automatically:
  • Text color low: Thin lines (width 1)
  • Text color medium: Medium lines (width 2-3)
  • Text color high: Thick lines (width 4+)
  • Recolor thresholds: Adjust at which width colors change

This creates visual hierarchy: thicker (more important) lines get brighter labels.
Label Format:
Labels combine prefix + timeframe + level:
  • "BB D +2" = Bollinger Daily +2σ
  • "PV W R1" = Pivot Weekly Resistance 1
  • "SMA 1D 50" = Simple Moving Average Daily 50-period

9. OFFSET AND POSITIONING
Controls line and label positioning to prevent overlap.
Offset Settings:
  • Type of Linedraw: "Time" or "Bars" based positioning
  • Offset labels Static/Dynamic: Base offset + weight-based multiplier
  • Offset line Static/Dynamic: Base offset + weight-based multiplier

How It Works:
Thicker lines automatically receive greater offset, preventing overlap and creating visual hierarchy.
Formula: [code]Position = Current Time + (Bar Width × Line Weight × Dynamic) + (Bar Width × Static)[/code]
Recommended Values:
  • Clean charts (few indicators): Static 5-10
  • Busy charts (many indicators): Static 15-20
  • Dynamic offset: Keep around 10

10. USAGE EXAMPLES
Day Trading Setup:
  • Enable: Daily Pivots, Daily OHLC, 1h Bollinger Bands
  • Multiplot: Daily SMA 20, 50, 200 (IDs 5, 6, 8)
  • Plot limitation: 5%

Swing Trading Setup:
  • Enable: Daily & Weekly Pivots, Daily & Weekly OHLC, Daily & Weekly Bollinger
  • Multiplot: Daily and Weekly SMA 50, 200 (IDs 6, 8, 10, 12)
  • Plot limitation: 10-15%

Position Trading Setup:
  • Enable: Weekly & Monthly Pivots, Weekly & Monthly OHLC
  • Multiplot: Weekly EMA 20, 50, 200 (IDs 21, 22, 24)
  • Disable: Hourly and Daily indicators

11. TROUBLESHOOTING
Lines not appearing:
  • Check master switch is enabled
  • Verify "Horizon plot masterswitch" is on
  • Check plot limitation settings
  • Ensure individual level toggles are enabled

Too cluttered:
  • Enable plot limitation and reduce percentage
  • Disable entire groups using master switches
  • Use thinner lines for less important levels

Labels overlapping:
  • Increase "Offset labels Static"
  • Reduce "Label-Size"
  • Increase dynamic offset multiplier

Multiplot not working:
  • Verify multiplot slot is enabled
  • Check corresponding timeframe group is enabled
  • Verify correct ID number
  • Check master SMA/EMA switch is on

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12. BEST PRACTICES
  • Start with all groups disabled, enable gradually
  • Use consistent color themes (warmer = shorter timeframe, cooler = longer)
  • Use line weight hierarchy: 1 (hourly), 2 (daily), 3 (weekly), 4 (monthly/yearly)
  • Use plot limitation when focusing on specific price ranges
  • Create multiple copies with different configurations for different scenarios
  • Disable unused groups completely for better performance

13. QUICK REFERENCE
Master Switches: PIVOTS | Bollinger Bands | SMAs | EMAs | OHLC | Horizon plot
Timeframe Options: Live, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, D, 2D, 3D, W, 2W, 3W, M, Y
Default Configurations:
  • Bollinger: 6h, D, 2D, 3D, W, 2W, 3W
  • SMA/EMA: 1h, D, W
  • Pivots: D, W, M, Y

Multiplot ID Quick Reference:
  • SMA 1h: IDs 1-4
  • SMA 1D: IDs 5-8
  • SMA 1W: IDs 9-12
  • EMA 1h: IDs 13-16
  • EMA 1D: IDs 17-20
  • EMA 1W: IDs 21-24

Within each group: 20 = first ID, 50 = second ID, 100 = third ID, 200 = fourth ID
Notas de Lançamento
complete rewrite, use of types.
no presentation differences
Notas de Lançamento
limit calculations to shrink memory usage to 10000 candles
Notas de Lançamento
Resolved critical "Error on bar 0" and memory management issues. Refactored request.security logic to bypass current compiler bugs related to User-Defined Types. The script now uses a more robust old school tuple-unpacking method to ensure stability and cross-timeframe reliability.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.