Loading…

Tick Flow Myth Tester

Retail trading forums make confident claims about "order flow" and "tick behaviour" that MQL4's actual tick feed can only partly speak to - there is no order book or per-tick volume API in MQL4, only the Bid/Ask price stream reaching OnTick. This tool tests three claims that CAN honestly be measured from that stream, and reports, per claim, whether the observed statistic clears an informal significance bar against a simple null or is indistinguishable from noise. Claim one covers two contradictory folk beliefs at once - "after N same-direction ticks in a row, the next tick is more likely to continue (momentum)" versus "more likely to reverse (exhaustion)" - by measuring the actual continuation rate against a 50/50 coin-flip null; one measurement settles both. Claim two tests "round numbers act as tick magnets" by comparing the fraction of ticks that land near a configurable round-price-level ladder against the fraction a uniformly distributed price would produce by pure band-width. Claim three tests "big moves cluster" (volatility clustering) by comparing how often an unusually large tick-to-tick price jump is immediately followed by another one, against the unconditional base rate of large jumps. Each verdict uses a plain two-sided z-test against its null with a 1.96-sigma cutoff (an informal ~95% bar), computed live and shown with its sample size, so nothing is asserted without the numbers behind it. Notes and limitations This is an informal significance check, not a rigorous hypothesis- testing framework: consecutive ticks are not statistically independent in the way a textbook z-test assumes, no correction is made for testing three claims at once, and the tick stream itself reflects this broker's own quoting behaviour, which is not identical to genuine market order flow. A "SURVIVES" verdict means the observed statistic is unusually far from the chosen null over this specific symbol and broker feed - it is a measured signal worth further scrutiny, not proof of a tradeable edge, and results will differ across symbols, sessions and brokers.

Expert advisor · MT5 · v1.0 · Free

About Tick Flow Myth Tester

Tick Flow Myth Tester is a script for MetaTrader 5. It has 7 settings, such as Streak length, Round level spacing pips and Near threshold pips. MQL source code included.

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

Settings

SettingDefaultWhat it does
Streak length3Consecutive same-direction ticks that define a "streak"
Round level spacing pips50.0Spacing between the "round" price levels tested
Near threshold pips3.0Distance from a round level counted as "near" it
Big move multiplier3.0A tick move bigger than this multiple of the running average is "big"
Avg change smoothing alpha0.02EMA smoothing factor for the running average tick move
Min samples for verdict200Minimum sample size before a claim gets a verdict rather than "insufficient data"
Recalc seconds15Minimum seconds between comment refreshes

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Volume · Momentum · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria