Main clusters and core pages.
This page originally described AlgoWay-MT5 EA v1.90. That version documented MT5 Inputs, supported webhook JSON fields, SL/TP models, trailing logic, risk mode, sessions and modify actions. The current AlgoWay MT5 workflow has moved forward to AlgoWayWS-MT5 EA 2.10, so this URL should now work as a current reference hub, not as a frozen v1.90 manual.
The URL is still valuable because traders search for MT5 EA JSON fields, TradingView to MT5 webhook JSON, MetaTrader 5 Expert Advisor inputs, MT5 webhook automation, TradingView alert SL TP MT5, and MT5 EA trailing stop JSON. Instead of losing that indexed traffic, AlgoWay now uses this page to explain the webhook message structure and send users to the current AlgoWayWS-MT5 guides.
The current route is:
TradingView alert → AlgoWay webhook → AlgoWayWS-MT5 EA → MetaTrader 5 broker account
Last updated: 2026-05-12 • Author: AlgoWay
If you arrived from Google looking for the old v1.90 user guide, use these current pages first:
| Need | Current guide |
|---|---|
| Install the current MT5 Expert Advisor | How to install an MT5 Expert Advisor for AlgoWay automation |
| Connect TradingView alerts to MetaTrader 5 | How to connect TradingView to MetaTrader 5 with AlgoWay EA |
| Understand current WebSocket EA architecture | AlgoWayWS-MT5 WebSocket EA overview |
| Build a correct AlgoWay webhook message | AlgoWay JSON schema guide |
| Understand SL/TP, trailing and risk controls | Advanced risk management and trade automation |
| Choose Hedge, Reverse or Opposite execution mode | How AlgoWay handles opposite trading signals |
| Fix MT5 execution errors | MetaTrader 5 common errors in AlgoWay |
The old v1.90 page was a detailed user guide for a specific EA version. It listed Inputs EA items, WebRequest requirements, trade modes, JSON fields, SL/TP models, risk percent mode, modify action, trade limits, sessions and auto-flat behavior.
The current page keeps that knowledge but changes the purpose:
AlgoWay does not replace your trading strategy. TradingView, Telegram, Pine Script, a manual test, or another signal source creates the instruction. AlgoWay receives that instruction and routes it to the destination platform. For MetaTrader 5, the current execution component is AlgoWayWS-MT5 EA.
The EA acts as the execution bridge inside MetaTrader 5:
A basic AlgoWay MT5 webhook message usually includes four fields:
| Field | Example | Purpose |
|---|---|---|
platform_name |
metatrader5 |
Tells AlgoWay to route the command to MetaTrader 5. |
ticker |
EURUSD |
Defines the instrument. It may need symbol mapping if the broker uses suffixes. |
order_contracts |
0.10 |
Defines the size before final EA/broker conversion rules. |
order_action |
buy |
Defines the action: buy, sell, flat, modify or supported directional value. |
Example:
{
"platform_name": "metatrader5",
"ticker": "EURUSD",
"order_contracts": 0.10,
"order_action": "buy"
}
For TradingView strategy alerts, the JSON message can use TradingView placeholders. TradingView replaces them when the alert fires.
{
"platform_name": "metatrader5",
"ticker": "{{ticker}}",
"order_contracts": "{{strategy.order.contracts}}",
"order_action": "{{strategy.market_position}}",
"price": "{{close}}"
}
This is the common bridge pattern used by TradingView-to-MT5 automation tools: TradingView creates the alert, the bridge validates the message, and the MT5 EA executes the command through MetaTrader.
The most important action field is order_action. It tells AlgoWay what the signal wants to do.
| Action | Meaning | Typical use |
|---|---|---|
buy |
Open or manage a BUY-side command | Long entry signal |
sell |
Open or manage a SELL-side command | Short entry signal |
flat |
Close position logic | Exit signal, close side, close symbol |
modify |
Modify an existing position | Update SL/TP by comment or identifier |
Some strategy outputs use values such as long, short, flat or custom action names. Always confirm how your current AlgoWay route maps those values before live trading.
The old v1.90 guide emphasized two SL/TP models. That concept still matters in current automation.
Use exact price fields when your signal already knows the precise Stop Loss or Take Profit level.
{
"platform_name": "metatrader5",
"ticker": "EURUSD",
"order_contracts": 0.10,
"order_action": "buy",
"sl_price": 1.08400,
"tp_price": 1.09000
}
Use distance fields when your signal sends stop and target distances instead of absolute price levels.
{
"platform_name": "metatrader5",
"ticker": "EURUSD",
"order_contracts": 0.10,
"order_action": "sell",
"stop_loss": 200,
"take_profit": 300
}
If both exact price fields and distance fields are present, exact price fields should be treated as the clearer instruction:
sl_price should win over stop_loss.tp_price should win over take_profit.More detail: How to automate MT5 Stop Loss and Take Profit from TradingView alerts.
Trailing stop automation can be defined globally in the EA or per trade through a JSON field, depending on current route behavior.
{
"platform_name": "metatrader5",
"ticker": "GBPUSD",
"order_contracts": 0.10,
"order_action": "buy",
"stop_loss": 120,
"trailing_pips": 80
}
Trailing stop logic depends on the current EA build, terminal connection and broker rules. If trailing is managed by the terminal or EA, MetaTrader 5 must remain connected for local trailing logic to continue.
For modify operations, the system needs to know which position should be changed. The legacy v1.90 guide used comment as the primary identifier and tv_order_id as a fallback when the comment was empty.
{
"platform_name": "metatrader5",
"order_action": "modify",
"ticker": "EURUSD",
"comment": "TV#12345",
"sl_price": 1.08300,
"tp_price": 1.09200
}
In current usage, always check the current JSON schema and EA behavior before relying on identifiers for live position modification.
When hedging is supported, close_side can be used with a flat-style command to close only one side of the symbol.
{
"platform_name": "metatrader5",
"order_action": "flat",
"ticker": "EURUSD",
"close_side": "long"
}
Typical meanings:
long — close BUY-side positions.short — close SELL-side positions.This behavior must match the selected AlgoWay mode and the broker account type. If the destination account is netting or one-way, hedge-side behavior may not apply the same way.
The old v1.90 page documented execution modes. The current explanation should focus on what happens when an opposite signal arrives.
| Mode | Practical meaning | When to use |
|---|---|---|
| Hedge | BUY and SELL can exist separately if the platform/account supports it. | Strategies that intentionally allow both directions. |
| Reverse | Opposite signal closes the current position and waits for another entry. | Opposite signal means exit, not instant flip. |
| Opposite | Opposite signal closes the current position and immediately opens the other side. | Strategies that must flip direction immediately. |
Full guide: How AlgoWay handles opposite trading signals.
The legacy v1.90 guide included a risk-percent mode where order_contracts could be interpreted as percent risk of equity. This is a powerful concept, but it must be used only with the current EA documentation and current dashboard settings.
Risk-based sizing usually requires a valid Stop Loss, because the system needs a stop distance to calculate position size from risk. If risk mode is enabled and no usable Stop Loss exists, the route should block execution instead of guessing.
Execution is not only about receiving a signal. The EA and AlgoWay configuration may also apply time and safety filters:
If a signal is rejected by a schedule or risk rule, that is not a TradingView failure. It means the automation layer followed the configured safety rules.
One of the most common MT5 automation problems is symbol mismatch. TradingView may send XAUUSD, while the broker requires XAUUSDm, XAUUSD.r or another exact symbol name.
| TradingView ticker | MT5 broker symbol |
|---|---|
EURUSD |
EURUSD.a |
XAUUSD |
XAUUSDm |
BTCUSDTPERP |
BTCUSDT.r |
Always check the exact symbol in MetaTrader 5 Market Watch before testing live order execution.
If TradingView sends plain text or broken JSON, AlgoWay may reject the webhook before MT5 receives anything. See: How to fix AlgoWay webhook Error 415.
Check the AlgoWay webhook UUID, current EA connection status, MT5 Experts log and the current AlgoWayWS-MT5 installation guide.
Check Market Watch and symbol mapping. The broker symbol must match exactly.
Check Stop Loss side, Take Profit side, stop level, freeze level, symbol digits and points/pips interpretation.
Test the supported order filling policy for the broker and symbol. Unsupported filling mode often appears together with MT5 Error 4756.
If MT5 returns Error 4752, enable Algo Trading and EA permissions. See: How to fix MT5 Error 4752.
When changing webhook JSON, test in layers:
sl_price and tp_price.This page remains online because it is already indexed and still attracts users looking for MT5 EA inputs, webhook JSON fields and TradingView-to-MT5 automation. Removing it would lose traffic and send old links to a dead end.
Keeping it online lets AlgoWay turn old version-specific traffic into current documentation traffic:
AlgoWay-MT5 EA v1.90 was a useful version-specific manual, but this URL now has a better role. It should act as a current MT5 EA webhook JSON reference and migration hub for AlgoWayWS-MT5 EA 2.10.
If you are building TradingView-to-MT5 automation today, start with the current AlgoWayWS-MT5 installation guide, send valid webhook JSON, test a simple order first, then add SL/TP, trailing, modify, hedge-side close and risk logic step by step.