Trend Candles Higher Timeframe Moving Average MT5

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.

More from author
SMC Zones marks Fair Value Gaps (FVG) and Order Blocks (OB) on the chart from closed bars only and shows by default only the unfilled zones nearest to the current price. Main features FVG detection from three closed candles, with a minimum size filter in multiples of ATR and in points. Order blocks: the last opposite candle before the move that created an FVG. No repainting: a zone that has appeared does not move or disappear, except when price fills it. Optional zones from a higher timeframe, d
FREE
Volume Profile Sidebar draws a horizontal volume-at-price histogram at the side of the chart and marks the Point of Control (POC) and the Value Area. Main features Three range modes: visible range, last N bars, or current day / session. POC row, Value Area rows (70% by default) and outside rows in separate colors. Optional lines and price labels for POC, Value Area High (VAH) and Value Area Low (VAL). Volume is spread across each bar's high-low range; M1 data is used when available, which gives
FREE
MTF Dashboard RSI ADX Volume is a compact panel in the main chart window that shows RSI, ADX and relative tick volume for several timeframes of the current symbol at once. Main features One row per enabled timeframe: M1, M5, M15, M30, H1, H4 and D1 by default. Columns TF, RSI, ADX, +DI, -DI, Trend and Vol %. The timeframe name is colored by its bias: bullish when +DI is above -DI and RSI is above 50, bearish when -DI is above +DI and RSI is below 50, neutral otherwise. Trend column: "Strong Up"
FREE
Gold Grid Risk Simulator calculates how a planned buy or sell grid affects your account: drawdown, margin level, margin-call price, stop-out price and the balance the grid needs. Main features Level-by-level simulation from a start price: entry, lot, cumulative lots, average price, basket TP, floating P/L, used margin, equity, margin level. Margin-call and stop-out prices, solved exactly between grid levels, with the distance from start in price units and %. Warning if stop-out comes before the
FREE
GoldGridBot
Dennis Hoinkis
GoldGridBot is a grid Expert Advisor for XAUUSD (gold) on MetaTrader 5. It waits for a strong momentum move, enters in the direction of the higher-timeframe trend and manages all positions as one basket with a common take profit. How it works Trend filter on M15 and M5 (moving averages) Entry after a momentum reversal on M1 Grid re-entries at a fixed distance when the price moves against the basket One take profit for the whole basket, measured from the average entry price Speed brake and time b
Breakout system for a tested list of US stocks: it waits for unusually quiet phases and trades the break out of them, many stocks in parallel with a small risk per trade. How it works Watches a tested list of US stocks on the hourly chart. Waits for an unusually quiet phase and places a breakout order beyond it. Stop and target on every order; open trades end after a fixed time at the latest. Small fixed risk per trade, with daily and overall loss limits. Tested settings The EA ships with the se
Monthly rotation into the strongest US stocks of the past months, equally weighted, long only, with an inflation filter. How it works Once a month ranks a list of about 200 US stocks by their strength. Holds the strongest group and sells what drops out of it. Brings every holding back to an equal weight each month. Stays out of stocks in months with a high-inflation warning. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2025, then run on
Scans a tested list of stock CFDs for bull flags and trades the breakout with a fixed risk per position. How it works One chart runs the whole stock list. Bull flag recognition plus our own confirmation filters. Defined stop and target on every trade. You set the risk per trade and the number of open positions; everything else is set and tested. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2025, then run on Nov 2025 – Oct 2026, MetaTrade
Trades the breakout of the Asian session on gold, only in the direction of the higher-timeframe trend. How it works Measures the quiet Asian session and waits for the breakout. Trades with the trend only; counter-trend breakouts are skipped. Defined stop and target on every trade, one position at a time, no grid, no martingale. Risk per trade in % of balance; everything else is set and tested. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct
Trend-following bull flag breakout on the Nasdaq 100 or the DAX 40, long only, M30, stop loss on every trade. How it works Two tested sets: Nasdaq 100 (Set A, higher risk) and DAX 40 (Set B, low drawdown); run each on its own index chart. Long only, in the direction of the trend. Defined stop on every trade. You set the position size; everything else is set and tested. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2025, then run on Nov 20
Trades the early-morning range breakout on gold, with stop and target taken from the range itself. How it works Builds its range once per day and places the breakout orders automatically. Stop and target come from the range, so every trade has a defined risk. Built-in protection around high-impact news. Risk per trade in % of balance; everything else is set and tested. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2025, then run on Nov 20
Daily trend following on gold, silver, oil and gas, long only, one position per symbol, stop loss on every trade. How it works Buys when short- and longer-term momentum point up at the same time. Stop loss and target on every trade, time exit after a few days. Checks the finished daily candle and trades at the open of the new one. One chart runs all four symbols. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2025, then run on Nov 2025 – O
Intraday momentum on the S&P 500 and the Nasdaq 100: trades only when price leaves its usual range for that time of day, flat before the close. How it works Learns the usual intraday range for each time of day. Checks a few times per session: long above the range, short below it, flat inside it. Emergency stop on every position, flat before the cash close, no positions overnight. Position size as a multiple of equity per index. Tested settings The EA ships with the settings from our November 202
Trades the breakout of the Nasdaq 100 out of its pre-market range at the New York open, at most one trade a day, flat before the close. How it works Measures the pre-market range before the New York open. Trades the first clean breakout after the open; the opposite side is cancelled. Defined stop on every trade; the exit follows the move until the close. Skips selected high-impact news days. Tested settings The EA ships with the settings from our November 2026 test: optimised on Nov 2023 – Oct 2
FVG Zones marks three-candle Fair Value Gaps (FVG) on the chart and draws each gap as a shaded zone that extends to the right until price comes back and fills it. Gaps can be taken from the chart timeframe or from a higher timeframe. Main features FVG detection from closed candles only, so a zone does not appear and disappear while a bar is still forming. Detection on the chart timeframe or on a higher timeframe, for example H1 gaps on an M5 chart. Two size filters that can be combined: minimum
FREE
Monte Carlo Grid Stop Out is a script that estimates how often a simplified grid model would reach the broker's stop-out level within a chosen horizon. It builds many random price paths from the symbol's own history and simulates the grid on each path with spread, commission, leverage and stop-out. Main features Block bootstrap of the loaded history (M1, M5 or M15): blocks of consecutive bars are chained in random order, so calm and volatile periods stay together. Bar-by-bar grid simulation that
FREE
Filter:
No reviews
Reply to review