PROTECTED SOURCE SCRIPT

Trend lines indicator by ForexBee

50
Enhanced 3-Swing Trendline Zones - Complete Feature Guide

WHAT THIS INDICATOR DOES
This indicator automatically draws trendline zones on your chart using a 3-point validation system. Instead of just connecting any two price points like basic trendline tools, it waits for three swing points to confirm the trendline is valid before drawing it.
תמונת-בזק


FEATURE 1: SWING POINT DETECTION

What it detects:
  • Swing highs: Price points where the high is higher than surrounding candles
  • Swing lows: Price points where the low is lower than surrounding candles
  • These show up as small arrows on your chart labeled "SH" (swing high) and "SL" (swing low)


Settings that control this:
  • Swing Length: Default is 6, range 1-20
  • Higher numbers = fewer, more significant swing points
  • Lower numbers = more swing points, including minor ones
  • Example: Setting 5 means each swing point must be higher/lower than 5 candles on each side


How to use this setting:
  • On 1-minute charts: Use 5-10 to filter out noise
  • On daily charts: Use 2-3 for more sensitivity
  • Volatile markets: Increase the number
  • Quiet markets: Decrease the number


Please See the Below Images To See the difference of swing length of 6 and 8
תמונת-בזקתמונת-בזק


Display control:
  • Show Swing Points: Turn the arrows on/off
  • Default: ON (you'll see the arrows)
  • Turn OFF if arrows clutter your chart

תמונת-בזק
תמונת-בזק


FEATURE 2: RETRACEMENT VALIDATION SYSTEM

What this does:
After finding two swing points, the system checks if the second swing represents a proper market retracement, not just random price movement.

How it works:
  • Finds the highest point between two swing lows (or lowest point between two swing highs)
  • Calculates how much the second swing retraced from this extreme point
  • Only accepts swings that retrace between your set percentages


Settings that control this:
  • Lower Limit %: Default 50%, range 0-100%
  • Upper Limit %: Default 90%, range 0-100%
  • These create a "valid retracement zone"


תמונת-בזק

Why this matters:
  • Eliminates random trendlines that don't follow market structure
  • Ensures trendlines represent actual retracement patterns
  • Based on Elliott Wave and Fibonacci principles




FEATURE 3: ATR-BASED ZONE WIDTH

What ATR means:
Average True Range measures how much price typically moves in a given period. Instead of fixed-width trendlines, this creates zones that adapt to market volatility.

Settings that control this:
  • Zone Width (ATR Multiple): Default 0.3, range 0.1-1.0
  • ATR Length: Default 14, range 1-50 periods


How zone width works:
  • Multiplier 0.1 = Very narrow zones (tight around trendline)
  • Multiplier 0.5 = Medium zones
  • Multiplier 1.0 = Wide zones (accommodates more price movement)


ATR Length explained:
  • 14 periods = Uses last 14 candles to calculate average volatility
  • Shorter periods (7) = More sensitive to recent volatility changes
  • Longer periods (21) = Smoother, less sensitive to volatility spikes

תמונת-בזק

Practical impact:
  • During high volatility: Zones automatically become wider
  • During low volatility: Zones automatically become narrower
  • Prevents false breakouts during normal market noise
  • Creates realistic support/resistance areas instead of precise lines



FEATURE 4: VISUAL ZONE SYSTEM

Active Uptrend Zones:
  • Green upper boundary line (solid, thick)
  • Lime green lower boundary line (solid, thick)
  • Green fill between lines (80% transparency)
  • These represent dynamic support levels


Active Downtrend Zones:
  • Blue upper boundary line (solid, thick)
  • Navy blue lower boundary line (solid, thick)
  • Red fill between lines (80% transparency)
  • These represent dynamic resistance levels


Broken/Expired Zones:
  • Gray/silver boundary lines (dashed, thick)
  • Original fill color maintained (green for uptrend zones, red for downtrend zones)
  • Shows historical trendlines that are no longer active




FEATURE 5: BREAK DETECTION SYSTEM

How breaks are detected:
The system monitors when price violates the zone boundaries, indicating the trendline structure has failed.

Settings that control this:
  • Use Wick Break: True/False toggle
  • TRUE: Break occurs when candle high/low touches zone boundary
  • FALSE: Break occurs when candle close price crosses zone boundary


Conservative vs Aggressive approach:
  • Wick Break = TRUE (Aggressive):
    - More sensitive, earlier signals
    - May produce more false breaks during volatile periods
    - Good for scalping and short-term trading
  • Wick Break = FALSE (Conservative):
    - Requires candle to close beyond zone
    - Fewer false signals, more reliable breaks
    - Better for swing trading and position trading


What happens when zone breaks:
  • Zone lines change from solid to dashed
  • Zone lines change color to gray/silver
  • Fill color remains original (green/red) for identification
  • Zone stops extending forward
  • Zone is removed from active monitoring

תמונת-בזק


FEATURE 6: ZONE EXPIRATION SYSTEM

What expiration does:
Allows trendlines to automatically become inactive after a set number of bars, even if they haven't been broken.

Settings that control this:
  • Use Zone Expiration: True/False toggle
  • Zone Expiration (Bars): Default 500, range 1-1000
  • FALSE: Zones run indefinitely until broken
  • TRUE: Zones expire after specified number of bars


Visual result:
  • Expired zones look identical to broken zones
  • Lines become dashed and gray/silver
  • Fill colors remain original (green/red)



FEATURE 7: MULTI-TIMEFRAME TREND ANALYSIS TABLE

What the table shows:
A small table on your chart that monitors trend conditions across four different timeframes simultaneously.

Settings that control this:
  • TF1, TF2, TF3, TF4: Four customizable timeframes
  • Default: 4H, 8H, 1D, 1W
  • Table Position: 9 positions (top/middle/bottom + left/center/right)
  • Text Size: Tiny, Small, Normal, Large, Huge


תמונת-בזק

How trend detection works:
  • Uptrend Pattern: Current candle's high AND low are both higher than previous candle's high AND low on specified timeframes
  • This creates higher highs and higher lows
  • Shows consistent buying pressure
  • Table displays green background with upward arrow (▲)


  • Downtrend Pattern: Current candle's high AND low are both lower than previous candle's high AND low on specified timeframes
  • This creates lower highs and lower lows
  • Shows consistent selling pressure
  • Table displays red background with downward arrow (▼)


  • Range/Sideways Pattern: Current candle creates either inside bar or outside bar
  • Inside bar: Current range smaller than previous candle
  • Outside bar: Current range larger than previous candle
  • Shows market indecision or consolidation
  • Table displays orange background with diamond symbol (◆)


  • No Clear Pattern: None of the above conditions are met
  • Table displays gray background with horizontal line (⎯)



How to interpret the table:
  • All timeframes green (uptrend): Strong bullish alignment
  • All timeframes red (downtrend): Strong bearish alignment
  • Mixed colors: Conflicting timeframes, exercise caution
  • Mostly orange: Market in consolidation phase
  • Tooltip explanations: Hover over each cell for detailed description



FEATURE 8: BACKGROUND COLOR SYSTEM

What background colors show:
Optional feature that colors your chart background based on the current timeframe's trend condition.

Settings that control this:
  • Show Background Colors: True/False toggle
  • Background Transparency: 80-98% range
  • Default: OFF (no background colors)


Color scheme:
  • Green background: Current timeframe showing uptrend
  • Red background: Current timeframe showing downtrend
  • Orange background: Current timeframe showing range/consolidation
  • No background: No clear trend pattern


Transparency levels:
  • 80%: More visible background color
  • 95%: Subtle background hint
  • 98%: Very subtle background tint






כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.