RelicusRoad Trendlines MT5
- Indicators
- Version: 2.297
- Activations: 10
RelicusRoad Trendlines is an automatic trendline indicator for MetaTrader 4 and MetaTrader 5 that fits trendline channels through confirmed swing pivots at three swing sizes and draws them as shaded zones.
Short, medium and long swings each have their own color. The chart shows the two or three channels that score highest at the moment, plus a grey checkerboard box that maps a reference entry, stop and target for one selected rail.
How it works
A swing high or low is confirmed only when it is the highest or lowest bar with a set number of closed bars on each side: 9 for short, 60 for medium and 156 for long swings by default. A line through the ten newest pivots normally needs at least three of them within 0.35 ATR, with no pivot in between poking through it. High and low lines are then paired into channels.
- Active: price is respecting the rail, and its zone is drawn at medium strength.
- Testing: the last close is within 0.2 ATR of the rail, and the zone is drawn brighter.
- Broken: two closes in a row beyond the rail by 0.25 ATR, and the zone fades.
- Retest: after a break, price touches the rail again and closes on the broken side, drawn brightest.
- Reclaimed: price has crossed back over a broken rail by more than 0.25 ATR, drawn faint.
Channels are chosen by a relevance score built from the rail's distance to price, its age, its touches and its state. A new line replaces the one on the chart only when it scores clearly higher or sits noticeably closer to price. A broken rail not retested within 48 bars is dropped.
What it draws
- Channel zones: translucent diagonal bands, red for short, goldenrod for medium and blue for long swings.
- Up to three channels: the two or three highest scoring channels, at most six rails in total.
- Developing channels: up to two fainter, dotted short-swing channels that are still forming.
- Trade plan box: grey checkerboard areas from entry to target and from entry to stop, spanning the next 8 bars.
- Plan tooltip: the direction, entry, stop, target and reward to risk ratio of the box you hover over.
Reading the chart
Brightness shows a rail's state. A bright zone is being tested or retested now, a mid-tone zone is active, and a faint zone has been broken or reclaimed. The color shows which swing size the rail came from, not its direction.
The plan box covers one rail at a time. An active upper rail gives a short plan and an active lower rail gives a long plan, with the stop just beyond the zone and the target at the opposite rail. After a break it can show a retest plan or one neutral area. Plans whose target is closer than their stop are not shown, and the levels are read from the tooltip rather than printed on the chart.
Lines update as price develops. On each new closed bar the model rebuilds, re-selects its channels and moves the drawn rails to their new anchors. Past lines are not kept, so a rail you saw yesterday can shift or disappear, and on some charts no rail passes the checks at all.
Inputs
Swing detection. The settings window lists these inputs under their internal names:
- InpTrendlineTF: the timeframe pivots and ATR are read from; rails are placed by time, so a higher timeframe lines up correctly.
- InpShortRange: closed bars on each side for a short swing, default 9.
- InpMediumRange: closed bars on each side for a medium swing, default 60.
- InpLongRange: closed bars on each side for a long swing, default 156.
Display:
- InpShowShort, InpShowMedium and InpShowLong: turn each swing size on or off, all on by default.
- InpClrShort: the short swing color, red by default.
- InpClrMedium: the medium swing color, goldenrod by default.
- InpClrLong: the long swing color, blue by default.
Recommended use
Built for forex, gold (XAUUSD), indices, stocks and crypto. A long swing needs 156 closed bars on each side to confirm, so long channels change slowly and are easiest to follow on H1 and above.
Common questions
Does RelicusRoad Trendlines repaint? The pivots it uses do not change once confirmed, but the drawn rails do. They are re-chosen as each bar closes and moved to new anchors, and past lines are not stored.
Why are the trendlines drawn as bands instead of thin lines? Price rarely turns at one exact price, so each rail is shown as a zone at least 0.2 ATR wide on each side of the fitted line.
Why does a trendline not touch the exact swing high? With three or more pivots the line is a weighted least-squares fit through all of them, so its anchors are fitted prices rather than the exact highs and lows.
Why is a medium or long channel sometimes missing? A channel appears only when both rails pass the fit checks, overlap each other by at least half their length and sit within 4 ATR of price. When no pair qualifies, that swing size is left off the chart.
About and support
Automatic trendline fitting is the drawing engine from RelicusRoad Pro, published alone for traders who want their trendline channels found and updated for them. It runs standalone.
Questions and support are handled in the product comments and through the mql5.com messaging system.
