Loading…

Uptick Downtick Ratio

Uptick/downtick ratios are a classic breadth tool on exchange-traded instruments with a real tape. Retail feeds have no such tape - the tick volume series is only a count of price updates, not signed trade flow - but the direction of each individual tick (did Bid move up or down from the previous one) is something the platform genuinely knows in real time. This indicator keeps a fixed-size rolling window of the last InpTickWindow tick directions in a ring buffer and reports the percentage that were upticks, giving a live read on whether recent order flow has leaned toward buyers or sellers pushing price. Because direction only exists tick by tick and neither platform keeps a historical tick-by-tick record, older bars are deliberately left blank rather than backfilled from a proxy - a close-to-close comparison, for instance, cannot recover what actually happened inside a bar and would quietly claim more precision than the platform can support. What the chart shows is exactly what it can honestly show: the ratio as measured since the indicator was attached. Notes and limitations - Ticks with no Bid change are not counted as either an uptick or a downtick; they simply do not move the ratio. - The window is measured in ticks, not time, so its effective time span stretches and shrinks with how busy the market currently is - during a quiet session InpTickWindow ticks can span much longer than during a fast one. - History before the indicator was attached, and any history before the terminal was last restarted, is not available and is left blank rather than estimated. - This is a flow proxy, not a volume measure, and should not be read as if it were exchange-reported buy/sell volume.

Indicator · MT4 · v1.0 · Free

About Uptick Downtick Ratio

Uptick Downtick Ratio is an indicator for MetaTrader 4. It has 1 setting, such as Tick window. MQL source code included.

Files in the download: UptickDowntickRatio.ex4, UptickDowntickRatio.mq4, UptickDowntickRatio.txt.

Settings

SettingDefaultWhat it does
Tick window300Number of most recent ticks kept in the rolling window

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 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 · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria