Loading…

Fibonacci Set Standardiser

MT4 remembers whatever levels, colour and style were last used when a fib tool was dragged onto a chart - which means a chart worked on over several sessions, or by more than one trader, usually ends up with fib retracements that all look and read slightly differently, even when they were drawn with the same intent. Comparing two fib retracements at a glance becomes harder than it should be when one has six levels in blue and another has nine in a different shade with no descriptions at all. This script finds every Fibonacci retracement object on the chart and reapplies one standard configuration to each: the same level set (0, 23.6, 38.2, 50, 61.8, 78.6 and 100 percent by default, optionally with 161.8 and 261.8 percent extensions), the same line colour, width and style, and a clean "23.6%"-style description on every level. The anchor points - where the fib actually starts and ends on the chart - are left untouched; only the levels and appearance are standardised. Level values in the underlying object property are stored as a fraction of the retracement (0.236, not 23.6), which the script accounts for internally - getting that scale wrong is the single most common way a hand-rolled version of this idea quietly redraws every level in the wrong place without raising any error. Notes and limitations - Only OBJ_FIBO (the plain Fibonacci retracement tool) is touched. Fib fans, arcs, channels, time zones and expansions are different object types and are left alone. - The anchor points of each fib are never moved - only the level set and appearance are rewritten. Run the companion swing-finding tool first if the anchors themselves also need resetting. - Per-level colours are not supported by MT4's fib object model in this build; every level shares the one line colour set by InpLineColour. - The script only affects objects already on the chart when it runs - it does not create new fib objects and is safe to run repeatedly.

Script · MT4 · v1.0 · Free

About Fibonacci Set Standardiser

Fibonacci Set Standardiser is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 6 settings, such as Name prefix, Include extensions and Line colour. MQL source code included.

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

Settings

SettingDefaultWhat it does
Name prefixOnly restyle objects whose name starts with this (blank = all fibs)
Include extensionsfalseAdd 161.8% and 261.8% extension levels
Line colourclrDodgerBlueLine colour applied to every fib
Line width1Line width applied to every fib
Line styleSTYLE_SOLIDLine style applied to every fib
Extend rightfalseExtend fib levels as rays to the right

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: Fibonacci · Trading Sessions · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria