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
| Setting | Default | What it does |
|---|---|---|
| Bars to draw | 150 | How many recent bars get recoloured objects |
| Rank window | 50 | Trailing bars (including the bar itself) used to rank its tick count |
| High percentile | 90.0 | Percentile at or above which a bar is classed "high activity" |
| Low percentile | 10.0 | Percentile at or below which a bar is classed "low activity" |
| High color | clrCrimson | Colour for high-activity bars |
| Low color | clrDodgerBlue | Colour for low-activity bars |
| Normal bull | clrForestGreen | Colour for a normal-activity up bar |
| Normal bear | clrSilver | Colour for a normal-activity down bar |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Volume · Trailing Stop & Break-even · MT5 Indicator · MQL5 Source Code