Docs menu

Indicator mode

Build a custom MetaTrader 5 indicator from blocks, preview it for free, and use it in an EA.

Indicator mode builds a custom indicator for MetaTrader 5 instead of a trading strategy. You wire price, built-in indicators and math into plots. The Builder draws the result on sample data. Seeing the code, downloading the .mq5 file and the Use in an EA tab need Pro.

Switch to Indicator mode

  1. Open the Strategy Builder.
  2. Use the EA / Indicator switch in the header and choose Indicator.

The header of Indicator mode has Preview, Code and Download .mq5 (the last two are marked PRO) and a ⋯ menu with Export JSON, Import JSON, Templates… and Clear canvas. The palette on the left lists Source, Built-in Indicators, Math, Signals and Plots blocks.

Indicator mode is a separate page with its own canvas. It does not change the EA flow you were working on. The Builder keeps the indicator flow in this browser, separately from your EA projects, and it is not saved to your account.

What is free and what needs Pro

FeatureAccess
Place and connect blocksEveryone
Preview, which draws the indicator on sample dataEveryone
Export JSON and Import JSON in the ⋯ menuEveryone
Code and Download .mq5 (the code is shown in the MQL5 tab)Pro only
Use in an EAPro only

Without Pro, the screen shows no code. Code and Download are marked PRO. If you are not signed in, pressing them shows “Sign in to unlock the source”. If you are signed in without Pro, they show “Editable .mq5 source is a Pro feature”. Both have a See Pro plans link.

The MQL5 tab without Pro: a card says the editable .mq5 source is a Pro feature, with a See Pro plans button.
The MQL5 tab without Pro. No code is shown.

Preview draws the indicator on generated sample bars, with a note that it shows the shape and not the exact values. The built-in indicators in the preview are written again in JavaScript, so they do not match MetaTrader digit for digit.

Indicator mode with the Smoothed RSI template loaded and the preview open under the canvas.
The Smoothed RSI template with its preview. The palette is on the left and the settings are on the right.

Blocks

Blocks are grouped by category. Wire values from left to right: sources, then indicators and math, then plots.

Category in the paletteBlocks
SourcePrice, Constant
Built-in IndicatorsMoving Average, RSI, ATR, Std Deviation, Momentum, CCI, Bollinger Bands, MACD, Stochastic, ADX, Williams %R
MathArithmetic, Scale & Offset, Absolute Value, Smooth, Highest, Lowest, Standard Deviation, Value N Bars Ago, Change
SignalsCross, Compare
PlotsLine, Histogram, Arrow, Level Line

An indicator needs at least one Plot block. The plot is what MetaTrader 5 draws.

Indicator settings

The right panel has the settings for the whole indicator.

SettingWhat it doesValues
NameThe name used for the file and in MetaTrader 5.Text
Short name (chart legend)The short name shown in the chart legend.Text
WindowWhere the plots are drawn.Separate window, or On the price chart
DecimalsHow many decimals the values show.Same as the symbol, or 0 to 5

Select a block to edit its settings under Node. Parameters you expose become inputs of the indicator in MetaTrader 5.

Checks

The Checks list shows problems as you edit, or “Ready to build.” when there are none. Download is disabled while an error is present. Warnings do not block it. The first time you open Indicator mode, the Smoothed RSI template is already on the canvas, so Checks says “Ready to build.” After Clear canvas the canvas is empty and Checks says “No Plot node”.

LevelMessage
ErrorNo Plot node — an indicator that draws nothing cannot be built.
ErrorPlot “name” has nothing wired into it.
ErrorThe flow loops back on itself — remove the cycle.
ErrorToo many nodes — MetaTrader allows at most 512 indicator buffers.
WarningBlock has no input — it will output 0.
WarningBlock uses the constant B (value) because only A is wired. This applies to Arithmetic, Cross and Compare.
WarningBlock does not reach any Plot — it will be left out of the indicator.

The “Too many nodes” error appears above 480 blocks. Constant and Level blocks are not counted; Plot blocks are.

Templates

Open the ⋯ menu and choose Templates… to start from an example. They are Smoothed RSI, Price Channel, ATR Bands, MACD Histogram, Price Z-Score, Bollinger %B, Stochastic Cross and ADX Trend Strength. Loading one replaces the flow on the canvas.

The Start from a template window with eight cards.
The template window of Indicator mode.

Use the indicator in an EA (Pro)

  1. Download the .mq5 file with Download .mq5.
  2. Put the file in the MQL5\Indicators folder of your MetaTrader 5 data folder.
  3. Open it in MetaEditor and compile it (F7) so the .ex5 appears next to it.
  4. Open the Use in an EA tab. It shows the indicator name, the iCustom arguments in order, and for each plot a buffer number and an Open in Strategy Builder (EA) button.
  5. Click the button for the plot you want. The Strategy Builder opens in EA mode with a block that reads that plot through iCustom.

Plot buffer numbers follow the order of the plots, not their position on the canvas. If you add, remove or reorder plots, open the tab again and use the new buttons, then compile the new indicator file.

The link the button opens has the form /strategy-builder?icustom=<name>&icparams=<values>&icbuf=<n>. You can also use one from your own notes.

The indicator is drawn from past prices. It does not predict future prices.