Loading…

Glyph And Arrow Catalogue

Every EA that draws its own buy/sell arrows, or every panel that shows a checkmark or a stop icon, ends up with the same raw Wingdings integer hardcoded at several call sites, usually with a one-word comment (or none) explaining what the number means. Change the icon later and every occurrence has to be found and changed by hand. This library keeps a small named registry instead: a handful of well-documented codes (up/down arrow, stop sign, checkmark, left/right price tag, thumbs up/down) are registered under readable keys using MQL4's own predefined SYMBOL_* identifiers, not guessed numbers. Two helper functions apply a registered glyph to a chart object correctly - OBJPROP_ARROWCODE for an OBJ_ARROW, or font+text for a label meant to show the glyph as text - so the call site only ever names the glyph it wants, never the code behind it. The registry is not fixed to those eight entries. Register() lets any project add its own named glyphs, Wingdings or otherwise (the demo adds a plain Arial character as an example), so a larger panel/dashboard project can build one central glyph table instead of scattering magic numbers across every file that draws an icon. Notes and limitations - The built-in catalogue is deliberately small - only the codes this developer has independently confirmed via MQL4's own predefined SYMBOL_* constants. It is not a full Wingdings character map. - Fixed capacity of 64 registered entries (GAC_MAX_ENTRIES) - ample for a glyph table, not meant for an arbitrary font's full character set. - ApplyToLabelGlyph() only sets the object's font and text; it does not create the label object itself - create it first with ObjectCreate() as the demo does. - No money is at risk. This library only touches chart objects.

Script · MT5 · v1.0 · Free

About Glyph And Arrow Catalogue

Glyph And Arrow Catalogue is a script for MetaTrader 5. It draws buy and sell arrows on the chart. MQL source code included.

Files in the download: GlyphArrowCatalogue.mq5.mqh, GlyphArrowCatalogue.txt, GlyphArrowCatalogueDemo.ex5, GlyphArrowCatalogueDemo.mq5.

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: Buy/Sell Arrows · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria