Loading…

Pip Value Cross Check

Every risk-based lot-sizing formula reads MODE_TICKVALUE and MODE_TICKSIZE and trusts them without question. Most of the time that trust is fine. Occasionally a broker's symbol specification is wrong - a mis-set contract size on an exotic CFD, a tick size that does not match the quoted digits, a feed that has not been refreshed since a specification change - and the first anyone notices is a position sized at double or half the intended risk, discovered after the fact. This script computes pip value three separate ways for each symbol and compares them. Method one is the standard approach: MODE_TICKVALUE scaled from one tick to one full pip using MODE_TICKSIZE. Method two rebuilds the figure independently from MODE_LOTSIZE and a live conversion rate to the account currency, found by searching Market Watch for a symbol that prices the quote currency against the account currency, directly or inverted - the same arithmetic a trader would do by hand. Method three deliberately reproduces the naive shortcut a lot of published Expert Advisors take: MODE_TICKVALUE scaled by the pip/point ratio while assuming tick size equals one point. That assumption holds for most ordinary forex pairs, which is exactly why method one and method three normally agree - and exactly why a disagreement between them is worth seeing, since it means some symbol in your Market Watch has a tick size that does not match its point size, a case that silently breaks any EA using the naive formula. A symbol is flagged when the spread between the largest and smallest of the available values exceeds the tolerance fraction of their average. Symbols where fewer than two methods produce a usable figure - no quote-currency conversion pair available in Market Watch, most commonly - are reported as skipped rather than silently scored, because a two-out-of-three or three-out-of-three comparison means something different from a one-out-of-three guess. Notes and limitations - Method two needs a Market Watch symbol that prices the quote currency against the account currency, directly or inverted. Exotic quote currencies with no such pair visible cause method two to be skipped for that symbol, which can drop the comparison to two methods or, on a symbol where method three also does not apply cleanly, below the two-method minimum. - This tool reads Market Watch data only. It does not open a demo trade to confirm the practical fill-time pip value, so a broker whose static specification is correct but whose commission or execution model changes the effective per-pip cost differently will not be caught here. - A flagged symbol is not proof of a broker error - occasionally it is a genuinely unusual contract specification (a metal quoted with a non-standard tick size, for instance). Treat the flag as "verify this by hand," not as an automatic conclusion. - The script does not modify anything. It is read-only and safe to run on a live account at any time.

Script · MT4 · v1.0 · Free

About Pip Value Cross Check

Pip Value Cross Check is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Symbol list, Tolerance fraction and Select all on empty. MQL source code included.

Files in the download: PipValueCrossCheck.mq4, PipValueCrossCheck.txt.

Settings

SettingDefaultWhat it does
Symbol listComma separated symbols, blank = every Market Watch symbol
Tolerance fraction0.02Disagreement flagged when methods differ by more than this fraction
Select all on emptytrueIf InpSymbolList is blank, scan the whole Market Watch

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

Download the PDF guide

Tags: Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria