Execution through the terminal
MT5 orders are placed by the EA under the broker account logged into the terminal. The terminal and EA must remain running and connected.
MetaTrader 5 is not a webhook receiver. AlgoWay bridges TradingView strategies and indicators to an MT5 terminal through its Expert Advisor, where broker symbol rules, position size and execution permissions decide the actual result.
A real integration guide, with execution rules and test scenarios.
An MT5 terminal cannot receive a TradingView webhook as an order on its own. AlgoWay receives the alert and passes the trading instruction to the Expert Advisor connected to your broker account. The EA must remain online for execution, and the broker ultimately decides whether the lot size and order parameters are valid.
AlgoWay gives each MT5 route a webhook identifier, while the AlgoWayWS-MT5 Expert Advisor handles execution inside the terminal. The EA connection, symbol mapping, trade mode and safety settings matter just as much as the alert itself.
MT5 orders are placed by the EA under the broker account logged into the terminal. The terminal and EA must remain running and connected.
TradingView contracts do not automatically equal MT5 lots. Set the EA Lot Multiplier for the intended units, then check broker minimum and step size.
Reverse, Hedge and Opposite behavior, session limits, SL/TP, trailing and drawdown protections are configured for the MT5 execution workflow.
The connection has two parts: an AlgoWay webhook destination and an Expert Advisor running in the trading terminal. Treat the UUID, the logged-in broker account and the EA status as a single configuration that must agree.
In AlgoWay, add a TradingView source and MetaTrader 5 destination. Copy the unique webhook UUID from the route.
Use AlgoWayWS-MT5 on supported Windows terminals or the Ubuntu/Wine native-socket build where appropriate. Attach it to a chart in the correct logged-in MT5 terminal.
Set the UUID inside EA Inputs and confirm the connected state in MT5 Experts logs before sending any order.
Inspect the broker symbol volume_min, volume_step and volume_max. Set Lot Multiplier and the desired sizing model; do not assume a TradingView quantity means lots.
Paste the AlgoWay webhook URL into TradingView, add structured JSON to Message and test a minimal order in a demo account. Verify both AlgoWay logs and the MT5 Trade/History tabs.
A TradingView strategy can supply its chart symbol, order direction and strategy quantity. The example intentionally contains no hard-coded order ID; order matching requires identifiers generated by the strategy and handled consistently by entries and exits.
{
"ticker": "{{ticker}}",
"order_action": "{{strategy.order.action}}",
"order_contracts": "{{strategy.order.contracts}}"
}TradingView substitutes the placeholders when the alert fires. The EA receives quantity through the route but interprets it according to its Lot Multiplier and broker contract settings. Validate the resulting MT5 lot volume in a demo terminal.
MT5 uses lots, and the contract size varies by instrument and broker. A forex strategy may express quantity in units while the EA expects a volume after applying Lot Multiplier. For an account where 100,000 units represent 1 lot, a multiplier of 0.00001 converts 10,000 units into 0.10 lots. This example is meaningful only with that instrument specification and configured EA multiplier; test actual volume in demo.
A TradingView alert for EURUSD may need to reach EURUSD.a, EURUSDm or another broker-specific instrument. Symbol Mapping prevents silent mismatches. The final broker symbol still needs to be visible and tradeable in Market Watch.
In Reverse/Netting, an opposite signal closes or reverses existing exposure under the selected rules. Hedge can preserve separately directed positions on accounts that support hedging. Opposite/Flip intentionally changes how the incoming direction is interpreted. Test entry, opposite entry, partial close and flat independently.
An SL drawn correctly on TradingView can violate MT5 Stops Level, Freeze Level or Bid/Ask distance requirements at execution time. Distinguish error 10016 (invalid stops) from error 10015 (invalid price); review the broker return code instead of blindly changing the JSON.
| Setting | Purpose | Verification |
|---|---|---|
| Webhook UUID | Same ID in the AlgoWay route and EA Inputs | EA connects to the intended webhook, not another route |
| EA build | Windows WS or Ubuntu/Wine native-socket EA as applicable | Terminal connectivity and Experts log |
| Lot Multiplier | Converts strategy quantity into broker lot volume | For a units-based forex strategy, 10,000 × 0.00001 = 0.10 lots before broker rounding |
| Broker symbol | Maps chart symbol to the broker catalogue | EURUSD and broker suffixes are not assumed interchangeable |
| Trade mode | Hedge, Reverse or Opposite behavior | Send entry and exit tests, then inspect actual position state |
A strategy emits a EURUSD long alert using a single TradingView contract-size convention. Account A is a small retail account with a conservative lot multiplier and a tighter daily loss limit; Account B uses a different broker suffix and smaller position size. Configure independent AlgoWay routes and EA settings for each account instead of sending one fixed lot value everywhere.
First verify that both terminals are connected, then send a demo entry followed by a flat alert. Only after those two actions agree with your intended exposure should you test absolute SL/TP, trailing, sessions and clone routing. Clone Mode distributes a signal; it does not remove broker-specific volume or execution rules.
Check EA connection, Algo Trading permission, the UUID and Experts log before changing the strategy.
Review Lot Multiplier, strategy units, broker contract size and volume step. Never correct this by guessing.
Review absolute versus relative exit fields, EA Inputs and the broker retcode; invalid stops can be rejected.
The EA must run in the MT5 instance connected to the actual broker account. A local install cannot execute in an unrelated VPS terminal.
Compare the AlgoWay webhook log with the MT5 Experts and Journal tabs, then the broker order history. A successful HTTP delivery without a connected EA cannot prove that the broker executed a position.
MT5 does not receive TradingView webhooks natively. AlgoWay receives the alert and sends it to the connected MT5 EA for broker execution.
You need a running, connected MT5 terminal. A VPS is useful for unattended operation, but an already reliable always-on terminal also works.
AlgoWay offers an Ubuntu/Wine-oriented MT5 EA build with native socket/TLS transport. Use the compatible build for that environment.
The EA applies sizing and multiplier rules while the broker enforces volume steps and contract specifications. Validate the conversion using a small demo order.
Yes. Telegram is a separate signal source in AlgoWay, with its own parsing and route settings; MT5 remains the execution destination.
The MT5 EA guides cover connection and sizing; the invalid-stops article explains why correct TradingView prices can still fail at a broker.
Start with a single strategy order and check its resulting lots, broker symbol and SL/TP inside MT5. Only then enable other accounts and additional risk controls.