Trendline Breakout Target Signals
- Indicatori
- Versione: 1.0
- Attivazioni: 5
Trendline Breakout Target Signals
Trendline Breakout Target Signals is a MetaTrader 5 indicator that automatically builds pivot-based trendlines, detects bullish and bearish trendline breakouts, displays Long and Short signal markers, and projects a dynamic target for each active breakout setup.
The indicator is designed for traders who use trendline analysis, price action and breakout trading but do not want to manually redraw every trendline as new market pivots form.
It combines confirmed pivot points, projected trendline slopes, price-crossing logic and volatility-based target calculations in one chart-based tool.
How It Works
The indicator identifies confirmed pivot highs and pivot lows and uses consecutive pivot values to calculate projected trendlines.
The pivot source can be calculated from either candle Wicks or candle Bodies.
Only trendlines with the required direction are used for breakout detection:
- A declining upper trendline can generate a bullish breakout.
- A rising lower trendline can generate a bearish breakout.
The indicator then compares the current and previous Close prices with the projected trendline value to determine whether a valid crossing has occurred.
Breakout detection is active for a limited number of bars after a new projected trendline has been formed.
Long Signal
A Long breakout setup requires:
- A valid projected upper trendline.
- The upper trendline slope to be flat or declining.
- No other tracked setup currently active.
- Previous Close below the previous projected trendline value.
- Current Close above the current projected trendline value.
- The breakout to occur inside the active trendline breakout window.
When these conditions are satisfied, a Long signal marker is displayed below the candle.
Short Signal
A Short breakout setup requires:
- A valid projected lower trendline.
- The lower trendline slope to be flat or rising.
- No other tracked setup currently active.
- Previous Close above the adjusted previous trendline level.
- Current Close below the adjusted current trendline level.
- The breakout to occur inside the active trendline breakout window.
When these conditions are satisfied, a Short signal marker is displayed above the candle.
Dynamic Target Calculation
Each breakout setup receives a dynamic Target based on a volatility-adjusted band.
The internal volatility band uses ATR(30) together with a percentage of price and references the corresponding value 20 bars earlier.
For a Long setup:
Target = Signal Candle High + Volatility Band x 20
Internal Stop Level = Signal Candle Low - Volatility Band x 20
For a Short setup:
Target = Signal Candle Low - Volatility Band x 20
Internal Stop Level = Signal Candle High + Volatility Band x 20
The Target is displayed directly on the chart when Show Targets is enabled.
The internal Stop level is used for setup tracking but is not displayed as a separate Stop Loss line.
Target Tracking
Only one setup is tracked at a time.
For a Long setup:
- Target is reached when High reaches or exceeds the Target.
- The internal Stop condition is reached when Close falls to or below the Stop level.
For a Short setup:
- Target is reached when Low reaches or falls below the Target.
- The internal Stop condition is reached when Close rises to or above the Stop level.
The Target label changes its visual state according to the result of the tracked setup.
Main Features
- Automatic pivot-based trendline detection
- Bullish trendline breakout signals
- Bearish trendline breakout signals
- Long and Short chart markers
- Wick or candle-body pivot calculation
- Projected trendline zones
- Adjustable trendline projection length
- Dynamic volatility-based Target calculation
- Internal Stop-level tracking
- Active Target visualization
- Target Hit and Stop Hit visual states
- Adjustable signal colors
- Adjustable target colors
- Adjustable arrow distance
- Efficient incremental MetaTrader 5 calculation
Pivot Calculation
The Period input controls the main pivot sensitivity.
The indicator uses:
- Left Pivot Period: selected Period
- Right Pivot Period: Period / 2
This means a pivot must first be confirmed by the required candles on its right side before it can participate in a projected trendline.
Increasing Period generally produces fewer, broader pivot structures.
Reducing Period generally makes the indicator react to smaller market swings.
Pivot Type
Two pivot calculation modes are available.
Wicks
Pivot highs use candle High values and pivot lows use candle Low values.
Body
Pivot calculations use the outer side of the candle body instead of the full wick range.
This allows traders to choose whether trendlines should react to full price extremes or candle-body structure.
Trendline Extension
The Extend input controls how far each detected trendline structure is projected forward.
Available settings are:
- 25
- 50
- 75
Longer extension settings provide a larger projected trendline zone, while shorter settings keep the visualization closer to the originating pivots.
Input Parameters
Core Settings
Period — Controls pivot sensitivity and the breakout evaluation window.
Pivot Type — Selects Wicks or Body for pivot calculations.
Extend — Controls the forward projection distance of detected trendlines.
Neutral Trendline Band — Controls the neutral trendline-zone color.
Show Targets — Enables or disables Target visualization.
Signal Style
Long Signal — Sets the Long breakout marker color.
Short Signal — Sets the Short breakout marker color.
Arrow Offset Points — Controls the distance between signal markers and candles.
Target Style
Active Target — Sets the active Target color.
Target Hit — Sets the Target label color after a Target is reached.
Stop Hit — Sets the Target label state after the internal Stop condition is reached.
Trading Use
Trendline Breakout Target Signals can be used as a technical analysis tool for:
- Trendline breakout analysis
- Dynamic support and resistance analysis
- Price-action breakout setups
- Bullish and bearish breakout confirmation
- Pivot structure analysis
- Target planning after a detected breakout
The indicator does not automatically open or manage trading positions.
Long and Short markers should therefore be treated as technical signals rather than automatic trade instructions.
Markets and Timeframes
The indicator does not contain a hard-coded trading symbol or chart timeframe.
It can therefore be tested on different MetaTrader 5 instruments and timeframes, including Forex pairs, metals such as Gold, stock indices and cryptocurrency CFDs when those instruments are available from the broker.
Signal frequency and trendline structure can vary considerably between symbols and chart periods, so traders should evaluate the settings for their own trading environment.
Signal and Repaint Information
The indicator evaluates the currently forming candle.
A Long or Short signal on the current candle can therefore appear or disappear before that candle closes if price moves back across the projected trendline.
Confirmed pivot points also require candles on the right side of the pivot before they become available to the trendline calculation.
This confirmation process introduces an intentional delay between the original pivot candle and the moment that pivot becomes confirmed.
For traders who prefer more conservative signal interpretation, breakout signals can be evaluated after candle close.
Performance
Trendline Breakout Target Signals is designed for efficient MetaTrader 5 operation.
Historical calculations and state reconstruction are performed during the initial indicator load.
During normal operation, the indicator processes only the most recent data required for the current calculation instead of recalculating the complete chart history on every tick.
The indicator does not require DLL files, WebRequest, external indicators or external symbol dependencies.
Risk Management
Trendline breakouts and projected targets do not guarantee future price direction.
Traders should consider appropriate position sizing, Stop Loss placement and overall risk management when incorporating the signals into a trading method.
Disclaimer
Trendline Breakout Target Signals is a technical analysis indicator for MetaTrader 5.
It does not guarantee future trading results. Trading financial markets involves risk, and users remain responsible for their own trading decisions and risk management.
