Half Trend MTF

  • Indicators
  • Evgenii Sutulov
    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

Half Trend MTF draws a stepped trend line that holds its level until the market takes it out, and flips to the other side when it does. Around it sits an ATR channel.

The decision it supports is a simple one, and it is stated plainly: the line says which side the trend is currently held on, the flip says the moment that changed, and the channel says how much room the current volatility gives price before the flip is likely to matter.

Because the line only moves when the extremes of the last N bars move against it, it does not wander in a chop the way a moving average does. It sits still, and then it flips.

What is on the chart

The Half Trend line, drawn in the trend's colour and unbroken across the flip bar: one plot while the trend is up, another while it is down, joined where they hand over. The ATR channel, an upper and a lower band whose distance from the line is a multiple of half the ATR, each band a thin line in its own colour. Between them two soft fills, the bull colour above the line and the bear colour below it, so which half of the channel price is in reads at a glance. And BUY and SELL arrows on the flip bars. Everything draws in the price window.

The panel

A canvas panel on the price chart, draggable, collapsible, closeable. It shows the timeframe in force and the amplitude actually being used. It says what the last closed bar was: a BUY flip, a SELL flip, or no flip. And it says whether the numbers on screen are the properties dialog's or the panel's, and how many were changed.

Below that sit the settings the panel can move, with their current values. The gear opens a three-tab sheet.

The Values tab 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, there is a counter of how many values are no longer the properties dialog's numbers, and one button puts them all back.

The Alerts tab covers the master switch, the per-event switches, the channels, the cooldown in minutes and a test alert. The Styles tab covers the palette, whether the line, the ATR channel and the arrows are drawn, the two channel fills, each with a switch of its own, the line width and the arrow size; it changes appearance only and never triggers a recomputation.

Three colour schemes: dark, light, and a colour-blind safe one that uses blue and orange rather than red and green. Everything about the panel, including every value changed on the sheet, is stored per chart and survives a timeframe change and a terminal restart. The interface is English.

Alerts

Off out of the box. Three events: a BUY flip, a SELL flip, and a touch of the Half Trend line, which is the pull-back event rather than the reversal event.

Channels: a popup window, a sound, a push to the mobile terminal and e-mail. There are per-event and per-channel switches, and a cooldown that defaults to two hours.

Alerts fire on the last closed bar. Two further alerts, off by default, speak on the forming bar within a chosen number of seconds of its close, and they are labelled early because a flip that exists mid-bar can un-happen. Telegram is not part of this product.

Signals on the forming bar

There is one switch that matters more than the others, and it is in the Values tab as well as in the inputs: whether buffers and arrows are allowed on the bar that is still forming.

With it on, which is the shipped default, you see a flip as soon as the market makes it. Sometimes that flip is undone before the bar closes and the arrow disappears. With it off, nothing is written on the forming bar at all: there is no repaint of any kind, and every signal arrives one bar late by construction.

Both behaviours are legitimate. The product does not pick for you and it does not hide which one it is doing: the panel and the setting name both say so.

Multi-timeframe

The Timeframe setting computes on a higher timeframe and draws the result here. Only closed senior bars are read: a chart bar shows the newest senior bar that had already closed by that chart bar's own close, so the flip lands on the bar that closes together with the senior bar, and nothing is drawn that could not have been known in real time.

The foreign series is built in the background. The first read of it can come back empty, the indicator retries, and the panel says whether it is waiting for a download or looking at a genuine shortage of history. It never fails initialisation over missing bars.

Reading it from an EA

Sixteen 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 bar. 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 trend 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, is 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, Override, counts how many settings were changed from the panel. Buffer 14 is the line as one unbroken series, and buffer 15 is the trend itself, 0 while up and 1 while down, so a strategy never has to infer direction from which line buffer is empty.

Buffers 0 and 1 are the contract: never painted, filled on every pass whatever the Styles tab says, and present in the Data Window. Hiding the arrows cannot starve a strategy of the signal.

An instance created by iCustom is read-only and always uses the parameters you passed. Buffer 13 lets a strategy detect that a chart instance is running on hand-changed numbers.

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 is called Half Trend MTF because Half Trend is the name of the method, not because it claims authorship of it. The original work is the original author's.

Honest limits

With forming-bar signals on, which is the shipped default, an arrow on the current bar can disappear before that bar closes. Turn the setting off and nothing is written on the forming bar at all. Closed bars never change either way.

A stepped trend line flips late by design. In a range it will flip repeatedly, and each flip will be a real flip of the line and a poor trade. Nothing here filters for whether a trend exists.

The ATR channel describes volatility. It is not a target, a stop, or a statement about where price will go.

Amplitude, channel deviation and ATR period all move the flips. Two configurations produce two different sets of arrows and neither is the correct one.

No profit figure, win rate or backtest result is claimed here.

More from author
Currency Strength Pro ranks the eight major currencies by relative strength, read from up to 28 pairs, on a multi-timeframe composite, then ranks the basket's own pairs into a graded scanner. Closed bars only, never on a tick. Launch price: $59. It rises to $69 after the next 10 copies, then step by step to the final $98.  The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. The strength table answers "which currency". The scanner
Currency Strength Flux ranks the eight major currencies by relative strength, read from up to 28 pairs, on a four-timeframe composite that only ever uses closed bars. The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. Everything on the panel serves that one decision. What it does The panel ranks EUR, GBP, AUD, NZD, USD, CAD, CHF and JPY from strongest to weakest. Every reading is built from the pairs your broker actually quotes.
FREE
Currency Strength Flux ranks the eight major currencies by relative strength, read from up to 28 pairs, on a four-timeframe composite that only ever uses closed bars. The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. Everything on the panel serves that one decision. What it does The panel ranks EUR, GBP, AUD, NZD, USD, CAD, CHF and JPY from strongest to weakest. Every reading is built from the pairs your broker actually quotes.
FREE
Wave Trend Oscillator MTF is a two-line momentum oscillator in its own sub-window. The fast line measures how far the typical price has run from its own smoothed centre, relative to its recent average deviation, and a slower average of that fast line is drawn beside it. The event is a cross between the two lines inside a zone the market has actually reached. Crosses in the middle of the range are not signals, and that single rule is what separates this product from a plain oscillator. Three thin
FREE
Currency Strength Pro ranks the eight major currencies by relative strength, read from up to 28 pairs, on a multi-timeframe composite, then ranks the basket's own pairs into a graded scanner. Closed bars only, never on a tick. Launch price: $59. It rises to $69 after the next 10 copies, then step by step to the final $98.  The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. The strength table answers "which currency". The scanner
UT Bot MTF
Evgenii Sutulov
UT Bot MTF is an ATR trailing stop and the flip signals it produces. The stop follows price at a distance of a chosen multiple of ATR, ratchets in the direction of the move and never gives ground back. When price closes through it, the stop flips to the other side and the indicator marks a BUY or a SELL. That is the whole engine, and it is deliberately simple. What this product adds around it is the part that decides whether you can actually use it: four independent filters, an honest account of
FREE
Exhaustion Count MTF counts. It does not predict direction and it does not tell you which way to trade. It answers one question: has this move been going on long enough that it is running out of participants. Two independent phases run on the chart, a setup and a countdown, each with its own rules, its own cancellation conditions and its own place in the buffers an Expert Advisor can read. The setup Nine consecutive closes on one side of the close four bars back, started by a price flip. A bar t
FREE
Exhaustion Count Scanner is two products in one file. The first is Exhaustion Count MTF itself, drawn on the chart in front of you: the setup and countdown numbers printed bar by bar, the Setup Barrier levels currently in force, and the arrows on completed signals. The second is a board that runs the same counting across a list of symbols on up to eight timeframes at once. A nine or a thirteen is a rare event on any one instrument, which is exactly the case a board is for. The table finds them a
Wave Trend Oscillator Scanner is two products in one file. The first is the Wave Trend oscillator itself, in this chart's own sub-window: the fast and slow wave lines and the histogram of their difference, coloured by whether momentum is expanding or fading, with divergence lines that can also be drawn on the price chart itself. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. This is one of the two products in the family where the grad
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 i
UT Bot Scanner is two products in one file. The first is UT Bot MTF itself, drawn on the chart in front of you: the ATR trailing stop coloured by the side it is on, and the flip arrows, with the same four optional filters the single-chart product carries. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. The board says which instruments have flipped and how recently; the chart under it shows you the trailing stop, so you do not have to a
Filter:
No reviews
Reply to review