This guide explains how to use EA v1.90 in MetaTrader 5: which settings exist in Inputs EA, and which fields are allowed in the webhook message (JSON). Internal implementation details are not covered.
The EA (Expert Advisor) is an MT5 executor: it receives commands via AlgoWay and executes trade actions (open/close/modify) on your MT5 account.
The EA is not responsible for:
In MT5, add the domain to the allowed WebRequest list:
https://algoway.coIf not added, a typical symptom is a WebRequest error (often 4014).
Inputs EA item: Your Algoway Webhook here
What to enter:
https://algoway.co/... is entered, this is not desired; use the UUID.Inputs EA item: Reverse / Hedge / Opposite
This is the main logic switch.
close_side is additionally supported to close only one side (see 9.4).Inputs EA items: Coefficient for work with Lots, Order filling type: AUTO, FOK or IOC
This is a multiplier applied to the size received in JSON as order_contracts.
order_contracts: 0.10 and coefficient = 1.0, the EA will try to open 0.10 lots.0.1, the EA will try to open 0.01 lots.Inputs EA items: ══ Symbols Mapping ══, TView Ticker N / Broker Ticker N
If TradingView uses one ticker but the broker’s MT5 uses another, fill the pairs:
TView Ticker N — as received in ticker from TradingView.Broker Ticker N — the exact symbol name in the broker’s MT5.If the symbol is not found, the EA shows “Symbol … not found” and the trade will not open.
stop_loss, take_profit (distance)sl_price, tp_price (absolute price)trailing_pips (per-trade trailing)==== EA BASED SL and TP ==== → Use fixed SL/TP (pips) inside EA, Internal SL distance in pips, Internal TP distance in pips==== EA BASED TRAILING ==== → Enable Trailing SL, Trailing Step in pipsInputs EA item: PIP type: AUTO/TRADINGVIEW/PERCENT
stop_loss/take_profit are treated as a percent of entry price.order_action — action (buy, sell, flat, modify)ticker — instrument tickerorder_contracts — size (or risk-percent if risk mode is enabled)sl_price / tp_price — SL/TP as absolute pricestop_loss / take_profit — SL/TP as distance (pips or % depends on PIP type)Priority rule: if sl_price/tp_price are set (and not zero), price levels are used; otherwise stop_loss/take_profit are used as distances.
trailing_pips forces trailing for that trade even if global trailing is disabled in the EA.
close_side is allowed only together with order_action="flat".
long — close only BUY positionsshort — close only SELL positionsIf close_side is sent with buy/sell/modify, the EA treats it as an error.
comment — primary identifiertv_order_id — fallback identifier if comment is emptyInputs EA items: Use fixed SL/TP (pips) inside EA, Internal SL distance in pips, Internal TP distance in pips
Hard rule: if Use fixed SL/TP (pips) inside EA = true, then on trade entry the EA applies Internal SL/TP and ignores all SL/TP from JSON.
Inputs EA items: Enable Trailing SL, Trailing Step in pips
trailing_pips → trailing is enabled for that trade and step comes from trailing_pips.trailing_pips is absent and Enable Trailing SL = true → uses Trailing Step in pips.trailing_pips is absent and Enable Trailing SL = false → no trailing.Inputs EA items: ==== ENABELE RISK IN PERCENT ====, Use order_contracts as % risk of equity
order_contracts becomes percent risk of equity.stop_loss is mandatory, otherwise execution is cancelled.For order_action="modify", the position must be identified via comment (preferred) or tv_order_id (fallback).
The EA does not open or close a position; it finds the position by symbol + comment and applies new SL/TP from the current JSON.
Inputs EA items: ==== Trade Limits ====, Max daily loss in %, Max drawdown per trade in %, Max positions, if 0 = no limit
Inputs EA items: ==== Sessions (UTC) ====, NY session: Winter or Summer, London, New York, Tokyo, Daily Trade Window
This is a time filter in UTC. If entry is blocked by schedule, logs show:
Order rejected by schedule: outside sessionsOrder rejected by schedule: outside daily windowInputs EA items: Autoclose mode, minutes before end
AUTOFLAT_NONE — disabledAUTOFLAT_END_OF_DAY — close positions before end of dayAUTOFLAT_END_OF_WEEK — close positions before end of week{
"platform_name": "binance",
"order_action": "buy",
"ticker": "BTCUSDT.P",
"order_contracts": "0.10",
"stop_loss": "150",
"take_profit": "300"
}
{
"platform_name": "tradelocker",
"order_action": "sell",
"ticker": "XAUUSD",
"order_contracts": "0.05",
"sl_price": "2055.50",
"tp_price": "2038.00"
}
{
"platform_name": "metatrader5",
"order_action": "buy",
"ticker": "GBPUSD",
"order_contracts": "0.10",
"stop_loss": "120",
"trailing_pips": "80"
}
{
"platform_name": "matchtrader",
"order_action": "flat",
"ticker": "EURUSD",
"order_contracts": "0.10",
"close_side": "long"
}
{
"platform_name": "ctrader",
"order_action": "long",
"ticker": "USDJPY",
"order_contracts": "0.10",
"stop_loss": "100"
}
{
"platform_name": "okx",
"order_action": "modify",
"ticker": "ETHUSDT",
"comment": "TV#12345",
"stop_loss": "140",
"take_profit": "280"
}
https://algoway.co to allowed list.This guide covers only JSON fields used by EA v1.90 and the corresponding Inputs EA items. Any invented parameters or format extensions are forbidden and not covered.