Loading…

Tick Count Percentile Candles

Reading volume usually means splitting attention between the price chart and a separate volume subwindow. This indicator puts the same information directly onto the candles: each of the last InpBarsToDraw bars is ranked against its own trailing InpRankWindow bars by tick count and converted to a percentile. Bars at or above InpHighPercentile are recoloured as high-activity, bars at or below InpLowPercentile as low-activity, and the rest keep an ordinary bull/bear colour. This build's MQL4 compiler does not support DRAW_CANDLES, and DRAW_COLOR_CANDLES is an MQL5-only plot type regardless, so the recoloured candles are not drawn as an indicator plot. They are chart objects instead - one trend-line wick plus one rectangle body per bar, anchored at that bar's real open/high/low/close - drawn on top of the terminal's own candles on the main window. The underlying chart candles remain visible underneath; switching the chart to line mode, or setting the candle body colour to match the background, gives the cleanest read if the overlap bothers you. The ranking is purely relative - a percentile among the bar's own recent history - so the same default settings adapt automatically to different instruments and timeframes without any fixed tick-count threshold. Notes and limitations - Non-repainting: a completed bar's percentile rank is fixed by that bar's own trailing history and does not change once it closes. - "Volume" is tick volume (the count of price changes per bar) - forex has no exchange volume on either MetaTrader platform, and this is the standard MT4 proxy for activity, not traded contract volume. - The recoloured objects sit on top of, not instead of, the terminal's own candles - this is a chart-object overlay, not a true custom candle plot type, because DRAW_CANDLES is unavailable in this MQL4 build. - Objects are named with a fixed prefix and removed in OnDeinit and as bars scroll out of the InpBarsToDraw window, so no clutter accumulates on the chart over a long session.

Indicator · MT5 · v1.0 · Free

About Tick Count Percentile Candles

Tick Count Percentile Candles is an indicator for MetaTrader 5. It has 8 settings, such as Bars to draw, Rank window and High percentile. MQL source code included.

Files in the download: TickCountPercentileCandles.ex5, TickCountPercentileCandles.mq5, TickCountPercentileCandles.txt.

Settings

SettingDefaultWhat it does
Bars to draw150How many recent bars get recoloured objects
Rank window50Trailing bars (including the bar itself) used to rank its tick count
High percentile90.0Percentile at or above which a bar is classed "high activity"
Low percentile10.0Percentile at or below which a bar is classed "low activity"
High colorclrCrimsonColour for high-activity bars
Low colorclrDodgerBlueColour for low-activity bars
Normal bullclrForestGreenColour for a normal-activity up bar
Normal bearclrSilverColour for a normal-activity down bar

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Volume · Trailing Stop & Break-even · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria