Loading…

Digit And Point Normalisation Demo

The single most common bug in beginner MQL4 code is treating "one point" and "one pip" as the same thing. On a 2 or 4 digit broker they are; on a 3 or 5 digit broker, where the quote carries one extra fractional digit, one pip is ten points, and code that hardcodes a stop-loss or take-profit distance in points while a user typed pips ends up ten times too tight or too wide without any error being raised - the order just goes through, quietly wrong. This EA does not trade. It reads every symbol currently selected in Market Watch, and for each one prints its raw Digits and Point value, the pip size derived from them (point multiplied by 10 on a 3 or 5 digit symbol, by 1 otherwise), and a fully worked example: a configurable pip distance converted into points, then into a normalised price offset from the current ask. Because the digit count is read fresh per symbol at runtime rather than assumed, the same table correctly shows a JPY cross at 3 digits, a metal or index at whatever digit count the broker uses, and a standard 5-digit forex pair side by side, without any per-symbol special-casing in the code. Notes and limitations - Only symbols currently selected (visible) in Market Watch are listed; add a symbol there first if it is missing from the table. - This is a display tool - it places no orders and modifies nothing. The pip/point conversion logic shown here is the same pattern used for real order placement elsewhere in this catalogue, on both platforms. - A symbol with no live quote yet (Ask still 0) is skipped from the table rather than shown with a meaningless zero price, on both platforms.

Expert advisor · MT4 · v1.0 · Free

About Digit And Point Normalisation Demo

Digit And Point Normalisation Demo 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 Demo pips, Max symbols shown and Refresh seconds. MQL source code included.

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

Settings

SettingDefaultWhat it does
Demo pips20Pip distance used for the worked conversion example
Max symbols shown30Cap on how many Market Watch symbols the table lists
Refresh seconds5How often the panel recalculates, in seconds

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 Expert Advisor · MQL4 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria