Half Trend Scanner MT5
- Indicators
-
Evgenii Sutulov
I build trading indicators, strategies, and dashboards that don't repaint.
Seven years doing this. MetaTrader 4, MetaTrader 5, TradingView.
Closed bars only. What you see is what happened.
The bar being formed never changes a published value. - Version: 1.3
- Updated: 2 September 2026
- Activations: 20
Half Trend Scanner is two products in one file. The first is Half Trend itself, drawn on the chart in front of you: the stepped trend line that holds its level until the market takes it out, the ATR channel around it, and the flip arrows.
The second is a board that runs the same calculation across a list of symbols on several timeframes at once. The board says which pairs have flipped and how recently; the chart under it shows you the line and the channel, so you do not have to attach a second indicator to act on what the table found.
The board
A row per symbol, a column per scanned timeframe, up to four columns and up to twenty-eight symbols. The symbol list is comma separated, or the board can take the Market Watch list instead. Broker prefix and suffix are detected from the chart you are on, or given by hand. Out of the box the board scans four timeframes: M15, H1, H4 and D1.
A cell reads like ^14b: which side the trend line is on, and how many bars ago it flipped there. The word flat means the calculation ran and found no direction. Three dots mean the cell has not been measured yet, and hovering it explains why in words. A signal older than the freshness threshold keeps its colour but is drawn quieter, so hue says direction and weight says how much it still matters. A row carrying a fresh signal anywhere in it gets a wash of the accent colour.
The AGREE column is the reason to use a board rather than eight charts. For each symbol it takes the visible timeframe columns, finds the majority side, and prints something like v3/4: the direction, and how many of the visible timeframes stand on it. When every visible timeframe agrees, the cell is drawn bold in that side's colour. A tie prints a dash and is deliberately not a verdict. With a single timeframe visible the column is removed entirely rather than printing 1/1, which would only restate the cell beside it.
Column headers are buttons. Click a timeframe header to sort by that column, freshest first, rows with nothing in it at the bottom; click it again to reverse. Click AGREE to sort by agreement, full agreement first. The active header carries the accent colour and a caret, so the sort state lives on the control itself. A separate Sort button cycles freshest, grade and name for a whole-board order.
A Show button cycles all, buys, sells and fresh. Buys and sells follow the AGREE verdict and not any single cell, so a row shown under buys always reads an up glyph in AGREE, and a tie appears under neither. This filters the view and not the calculation: a hidden row is still measured and can still alert.
The legend above the table decodes the notation in one line and can be switched off. Timeframe buttons show and hide a column without stopping the calculation behind it. Clicking a cell switches this chart to that symbol and that timeframe rather than opening a window.
The visible row count is fitted to the chart pane and the row setting is a maximum. No page buttons are drawn when everything fits; when it does not, previous and next appear with the page number. Because the board never draws more rows than the pane holds, the page buttons are always on screen and always reachable, however tall the row setting is.
Two status lines are always on show: symbols ready of total, how long since the last update, signals in the lookback window; then either the watchdog line or a sentence explaining why nothing is showing.
Diagnostics
A second panel, off by default, answers the question "why is there no signal": symbol coverage, which series are short of bars, how many signals were found in the window, and how many symbols this indicator switched on in Market Watch to do its work. A cell that could not be measured is explained rather than left blank.
The chart indicator
Drawn in the price window: the Half Trend line coloured by its side and unbroken across the flip bar, the ATR channel with each band a thin line in its own colour, two soft fills, the bull colour above the line and the bear colour below it, and BUY and SELL arrows. It can be switched off from the Styles tab if you only want the board. Its timeframe is set separately from the timeframes the board scans.
The settings sheet
The gear opens three tabs. Values covers the timeframe, the amplitude, whether forming-bar signals are shown, the channel deviation and the ATR period. Every row has steppers, a range and a sentence of help. Changing one recalculates the whole board, and the panel reports its progress while it does.
Alerts covers the master switch, the per-event switches, the four channels, the cooldown and a test button.
Styles covers the legend, whether the indicator is drawn on this chart, the palette, the trend line, the ATR channel, the two channel fills, the arrows, line width and arrow size. These are the same display controls the matching single-chart indicator carries, under the same names, so a chart set up one way can be reproduced on the other.
Three colour schemes, including a colour-blind safe one that uses blue and orange rather than red and green. Panel position, scheme, the sort, the filter, which columns are visible and every value changed on the sheet persist per chart across a timeframe change and a terminal restart. The interface is English.
Alerts
Off out of the box. A master switch sits on the panel itself, next to a Test alert button that fires through every channel currently on.
The events are a fresh BUY and a fresh SELL, declared separately for each scanned timeframe, plus data health, which speaks when a symbol loses or regains its data. There is a minimum grade setting; this port does not grade, so every signal counts as grade one for that purpose.
The channels are a popup window, a sound, a push to the mobile terminal and e-mail. The cooldown is kept per cell and per event, thirty minutes by default. Telegram is not part of this product.
Cost
The work is budgeted: a set number of symbols is refreshed per timer tick, so a long list spreads its load instead of stalling the terminal. The first pass is progressive and the panel reports the percentage measured.
Reading it from an EA
The chart indicator publishes fifteen buffers, all readable through iCustom and CopyBuffer. Buffer 0, Buy, carries the arrow price on a BUY flip bar and EMPTY_VALUE otherwise, and is not drawn; buffer 1, Sell, is the same for a SELL flip. Buffers 2 to 5 belong to the two channel fills and are display plumbing, not for reading. Buffer 6, Half Trend Up, is the trend line while the trend is up, and buffer 7, Half Trend Down, is the same line while the trend is down; on a flip bar both hold a value, which is what keeps the drawn line unbroken. Buffer 8, ATR High, is the upper channel band and buffer 9, ATR Low, the lower one. Buffer 10, BuyMark, and buffer 11, SellMark, are the drawn copies of buffers 0 and 1. Buffer 12, Signal, is +1 on a BUY flip, -1 on a SELL flip and 0 when there is no flip. Buffer 13 is the line as one unbroken series and buffer 14 is the trend itself, 0 while up and 1 while down.
Buffers 0 and 1 are the EA contract. They are never painted, and they are filled on every pass whatever the Styles tab is set to, so nothing on the display side can starve a strategy of a signal. What you see on the chart is the drawn copy, kept in step with the contract. Hiding is done by changing how a plot is drawn, never by emptying a buffer, so every index listed above stays readable through iCustom and CopyBuffer and stays visible in the Data Window with the display switches off.
This map is the scanner's own and it is not the same as the single-chart Half Trend MTF, which inserts an Override buffer at index 13 and publishes the unbroken line and the trend at 14 and 15. Read the list above.
The board itself is a panel and not a buffer. It is read by eye and by alert.
Provenance
This is a port of "HalfTrend", published on TradingView by everget, which is itself a port of an older MT4 indicator. The algorithm is canonical and originates on MT4. The TradingView script is openly published, which makes a port by formula admissible, and this implementation was reconstructed from the formulas rather than translated line by line.
The product carries the method's name because that is what it implements. The original work belongs to its authors and no authorship of it is claimed here.
Honest limits
The board reads closed bars and counts a cell's age in closed bars. On the chart indicator, with forming-bar signals on, an arrow on the unfinished bar can disappear before that bar closes. Turning the setting off leaves the forming bar empty entirely, and what has been published on a closed bar does not change afterwards either way.
AGREE counts timeframes, it does not estimate probability. Four timeframes agreeing means four correlated readings of one instrument agreed. A tie produces no verdict on purpose and is hidden by both the buys filter and the sells filter.
A stepped trend line flips late by design, and on a board that means several pairs will show a fresh flip during the same range-bound hour, each of them real and none of them good.
Scanning costs. Twenty-eight symbols on four timeframes is a hundred and twelve cells and will be felt on a slow machine; the budget setting is what you turn down.
Symbols your broker does not carry, and series too short for the ATR period, cannot be measured, and the board says which and why.
No profit figure, win rate or backtest result is claimed here.

