Trend Candles Higher Timeframe Moving Average MT5
- Indicators
-
Dennis Hoinkis
MT5Bots – Expert Advisors for MetaTrader 5 with published tests
We build and test our own Expert Advisors for MetaTrader 5: breakouts, chart patterns and trend strategies on US stocks, gold, indices and commodities.
How every bot is tested: - Version: 1.0
Trend Candles HTF MA colors the candles of the current chart by the trend of a higher timeframe: bullish, bearish or neutral, depending on where the close lies relative to a moving average on that timeframe.
Main features
- Main moving average (EMA or SMA on close) on a selectable higher timeframe.
- Optional confirmation moving average on a second timeframe.
- Buffer zone in percent around each average, so that small crossings do not change the color.
- Three candle colors: bullish, bearish and neutral.
- Optional line of the main higher timeframe average on the chart.
- Optional mode that uses only completed higher timeframe bars, so that closed chart bars never change color.
How to read it
A candle is bullish when its close is above both averages by more than the buffer, bearish when it is below both by more than the buffer, and neutral in all other cases, for example inside the buffer or when the two averages disagree. With the confirmation average switched off, only the main average is used. The main average appears as a step line, because one higher timeframe value covers several chart bars. A common setup is an M1 or M5 chart with candle colors that follow the M15 trend. A wider buffer gives fewer color changes and more neutral candles; a smaller buffer reacts faster. To see only the colored candles, set the chart colors for bars, candles and the line chart to "None" in the chart properties (F8). Otherwise the indicator draws its candles on top of the chart's own candles.
Main inputs
- Main MA timeframe: M15; period: 50; method: EMA (used for both averages).
- Confirmation MA: on; timeframe: M5; period: 20.
- Buffer around the MA: 0.05%.
- Use completed HTF bars only: off.
- Candle colors: bullish gold, bearish orange-red, neutral gray.
- Main MA line: on, with color and width.
Notes and limits
- In the default mode the average of the forming higher timeframe bar keeps changing until that bar closes, so recent chart bars can change color until then. After the higher timeframe bar has closed, their colors are final.
- With "completed HTF bars only" switched on, closed chart bars never change color; the colors then react up to one higher timeframe bar later.
- A timeframe lower than the chart timeframe is replaced by the chart timeframe.
- Works on any symbol and timeframe. The percentage buffer scales with price, which suits symbols such as XAUUSD.
- The indicator gives no alerts and no trading signals; it is a visual aid for trend context.
- No DLLs and no external files are used.
This tool does not trade.
Part of the MT5Bots tool set.
