Gold Silver Trendline Ultra
- 지표
-
Gond Jignesh Surendrabhai
Hello!
I'm Jignesh Gond, an algorithmic trading developer specializing in MQL5 Expert Advisors, indicators, scripts, and trading automation for MetaTrader 5. - 버전: 10.0
- 활성화: 5
Gold Silver Trendline Ultra
Professional Multi-Timeframe Support and Resistance Trendline Detector with Real-Time Signal Labels
This indicator finds and draws the strongest support and resistance trendlines across 6 timeframes automatically. It updates labels in real time as price interacts with each line. No manual drawing. No guesswork. Just clear levels that matter.
What This Indicator Does
Most traders draw trendlines by hand. Two clicks, a line, and hope it holds. The problem is that manual trendlines are subjective. Two traders looking at the same chart will draw different lines. Worse, you miss the lines on timeframes you are not watching. This indicator solves that by scanning every timeframe systematically and only drawing lines that have statistical significance based on multiple price touches.
Each timeframe is processed independently. The zigzag algorithm identifies pivot highs and lows. Then every pair of pivots is tested to find lines with the most price contact. The best support line and the best resistance line per timeframe are drawn with full ray extensions.
Why Multi-Timeframe Matters
Support and resistance on one timeframe can be invisible on another. A key Daily resistance might not be obvious on an M5 chart. This indicator draws all timeframes on the same chart so you always see the full picture. M1 lines for precision entries. M5 and M15 for intraday structure. H1 and H4 for swing context. Daily for the big picture.
When multiple timeframes show the same level, that is high-confluence trading zone. When lower timeframes break a level, check the higher timeframe to decide if it is a real breakout or a fakeout.
Signal Labels Explained
Support Lines
BOUNCE UP > BUY
Price touched the support line and closed back above it within the last 5 bars. This is a long entry signal. The support held and buyers stepped in.
ABOVE > BULLISH
Price is trading above the support line by more than the tolerance threshold. The support zone is intact. No immediate signal but the trend is healthy.
AT SUPPORT > WATCH
Price is within the tolerance zone of the support line. This is a decision point. Traders should watch for a bounce or a break. Do not enter here. Wait for the next label to confirm direction.
BROKEN > SELL
Price broke below the support line by more than the tolerance threshold. The level that was providing support has turned into resistance. This is a bearish signal. Previous buyers are now trapped and may exit, adding to selling pressure.
Resistance Lines
BROKEN > BUY
Price broke above the resistance line by more than the tolerance threshold. The level that was providing resistance has turned into support. This is a bullish signal. The breakout suggests momentum is strong.
REJECTED > SELL
Price touched the resistance line and closed back below it within the last 5 bars. This is a short entry signal. The resistance held and sellers stepped in.
BELOW > BEARISH
Price is trading below the resistance line by more than the tolerance threshold. The resistance zone is intact. No immediate signal but the trend is weak.
AT RESISTANCE > WATCH
Price is within the tolerance zone of the resistance line. Decision point. Watch for rejection or breakout.
Pivot Detection Methodology
The zigzag algorithm identifies swing highs and swing lows on each timeframe. A swing high is a bar where the high price is higher than the specified number of bars on both sides. A swing low is a bar where the low price is lower than the bars on both sides. The Zigzag Sensitivity parameter controls this. A value of 5 means each pivot must be higher or lower than 5 bars on each side.
Once pivots are identified, the algorithm tests every pair of same-type pivots to find valid trendlines. Two swing highs are paired to test a resistance line. Two swing lows are paired to test a support line. For each pair, every other pivot is checked to see if it touches the line within the tolerance threshold. Lines with the most touches are kept.
Only the strongest line per type per timeframe is displayed on the chart. If you have 500 potential pivot pairs on a timeframe, only the single best support and single best resistance line are drawn. This keeps the chart clean and focused on the most relevant levels.
Touch Tolerance and ATR
The Touch Tolerance parameter is a multiplier of the Average True Range. A setting of 0.3 means a pivot can be within 30% of the ATR distance from the line and still count as a touch. In volatile markets, ATR expands and tolerance widens automatically. In calm markets, tolerance tightens. This ensures the indicator works across all market conditions without manual adjustment.
Input Parameters Reference
TIMEFRAMES TO ANALYZE
Enable or disable each timeframe independently. If you only trade intraday, disable Daily to reduce clutter. If you are a position trader, enable only H4 and Daily. Each timeframe adds 2 trendline objects (support and resistance) plus 2 label objects.
M1 Timeframe - Default: true
For precision entries and exits. M1 lines are short term and react quickly.
M5 Timeframe - Default: true
Common timeframe for scalping and short-term trades.
M15 Timeframe - Default: true
Intraday structure. Good for identifying the session trend.
H1 Timeframe - Default: true
Hourly levels that often hold for several hours or days.
H4 Timeframe - Default: true
Swing trading levels. H4 lines are respected by most intraday traders.
Daily Timeframe - Default: true
Major structural levels that can last weeks or months. Daily lines are the most significant.
TRENDLINE DETECTION
Zigzag Sensitivity - Default: 5, Range: 1 to 20
Number of bars required on each side of a pivot. Lower values produce more pivots, which means more trendline candidates. Higher values produce fewer pivots and only show major swing points. For active trading on M1 and M5, values of 3 to 5 work well. For Daily analysis, values of 7 to 12 filter out noise.
Minimum Touches - Default: 3, Range: 2 to 10
Minimum number of price touches required for a trendline to be considered valid. A line with only 2 touches is just two random points. A line with 3 or more touches has statistical significance. Higher values produce fewer but more reliable lines. For swing trading, 3 is a good balance. For position trading, consider 4 or 5.
Touch Tolerance - Default: 0.3, Range: 0.1 to 2.0
This value is multiplied by the ATR of the timeframe to calculate touch tolerance. For example, if ATR on H1 is 100 pips and tolerance is 0.3, a pivot within 30 pips of the line counts as a touch. Higher values detect more lines but reduce quality. Lower values require precise touches.
VISUAL SETTINGS
Each timeframe has its own color setting. The defaults are chosen for clear visibility against typical chart backgrounds. M1 is DimGray because it is the least significant. D1 is Red because it is the most significant. You can customize all colors to match your chart theme.
Line Width controls the thickness of all drawn trendlines. Default 2 is visible without being distracting. Increase to 3 or 4 if you trade on high DPI displays or need more visual weight.
How to Use in Trading
For Scalping (M1 and M5)
Watch the M1 and M5 labels. When price approaches these lines, look for the BOUNCE or REJECTED label to appear. This is your entry signal. Place a stop loss just beyond the line. Take profit at the next line on the same timeframe or the next higher timeframe.
For Day Trading (M15 and H1)
Use the H1 lines to identify the direction of the day. If H1 support is rising and price keeps bouncing off it, the intraday trend is up. Take long entries when M15 bounces off the H1 support line. If H1 resistance is falling and price keeps rejecting it, the trend is down.
For Swing Trading (H4 and Daily)
The Daily support and resistance lines are the most important. They represent levels that have been tested multiple times over weeks or months. When Daily support holds, hold your long position. When Daily resistance breaks, that is a major signal that the trend has shifted. Ignore M1 reactions at Daily levels. The Daily timeframe matters more.
Multi-Timeframe Confluence
The most powerful setups happen when the same level appears on multiple timeframes. If M15, H1, and H4 all show a resistance line within a close range, that zone is extremely significant. A breakout through that zone with momentum is a high-confidence trade. A rejection at that zone is also a high-confidence reversal trade.
Chart Management
The indicator draws up to 12 trendline objects and 12 label objects per chart (support and resistance for each of 6 timeframes). All objects are prefixed with TPRO_ so they can be managed or deleted easily. To remove all indicator lines at once, run a script that deletes objects by prefix.
The indicator only rebuilds lines on new bars. Labels update every 5 ticks to balance performance with responsiveness. This means smooth operation even during high volatility news events.
About the Author
Jignesh Gond is an active XAUUSD trader with years of experience trading gold and silver. This indicator is built from real trading experience, not theory. Every feature exists because it solved a real problem in live trading.
MyFxBook:
MQL5 Profile: https://www.mql5.com/en/users/jigu266
