Loading…

Colour Blind Palette Adapter

MetaTrader's default colours - red for sell/bearish, green for buy/ bullish - are exactly the pair that is hardest to distinguish for the most common forms of colour vision deficiency. Every indicator and EA on a chart that draws arrows, lines, or boxes in that scheme is, for a meaningful fraction of traders, drawing two different things in what looks like the same colour. There is no terminal-wide setting that fixes this, because the colours are baked into each program's own object-creation calls. This tool works from outside those programs, the only place it can: it scans every chart object by name and, wherever a fragment in the name is recognised (comma-separated lists you configure, e.g. "Buy", "Sell", "Up", "Down", "TP", "SL"), overwrites that object's colour property with a colour-blind-safe replacement - either the widely cited Okabe-Ito set or a simple blue/orange two-tone, both chosen to stay distinguishable across the common forms of red-green colour vision deficiency. It cannot reach a compiled-in DRAW_* plot colour on another indicator's own buffer - that is a property of the indicator's binary, not a chart object, and nothing outside that indicator can change it. What it reaches is genuinely everything else: any named OBJ_* object any program on the chart creates, which covers the large majority of the manual "buy arrow here, sell arrow there" style markers traders actually rely on to read a chart at a glance. Notes and limitations - Only chart OBJECTS are reachable - a compiled indicator's own DRAW_LINE/DRAW_ARROW plot colour is not a chart object and cannot be changed from outside that program. - Classification is purely name-based. If the objects on your chart do not carry a recognisable fragment in their name (e.g. generic auto-numbered names with no semantic text), nothing will match - check the actual object names first via Object List. - Good/Bad fragment lists are checked before Neutral, so a name that happens to match both a role fragment and a neutral fragment is coloured as the role, not neutral - the more specific match wins. - Only one recoloured colour is stored per object name (the colour seen the first time that name was encountered); if another program itself changes that object's colour again after this tool already recorded it, the restore-on-remove step restores the FIRST captured colour, not necessarily whatever colour was in place immediately before removal. - Tracking for restore-on-remove is capped at 500 distinct object names to keep memory bounded; on a chart with more matching objects than that, the oldest-tracked ones beyond the cap are still recoloured going forward but will not be restored on removal.

Indicator · MT4 · v1.0 · Free

About Colour Blind Palette Adapter

Colour Blind Palette Adapter is an indicator for MetaTrader 4. It has 8 settings, such as Palette, Good prefixes and Bad prefixes. MQL source code included.

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

Settings

SettingDefaultWhat it does
PaletteCB_OKABE_ITOReplacement colour palette
Good prefixesBuy,Up,Bull,TPComma-separated name-fragments mapped to GOOD
Bad prefixesSell,Down,Bear,SLComma-separated name-fragments mapped to BAD
Neutral prefixesPending,Info,FlatComma-separated name-fragments mapped to NEUTRAL
Match anywheretrueMatch fragment anywhere in name (false = prefix only)
Case sensitivefalseCase-sensitive matching
Rescan seconds2How often to rescan all chart objects, seconds
Restore on removetrueRestore each object's original colour when this tool is removed

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 → Indicators.
  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 indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Buy/Sell Arrows · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria