# Installing AlgoWayWS-MT5 EA for TradingView to MetaTrader 5 Automation AlgoWayWS-MT5 is the MetaTrader 5 Expert Advisor used to receive TradingView webhook commands through AlgoWay and execute them inside an MT5 broker account. The route is: ```text TradingView alert → AlgoWay webhook → AlgoWayWS-MT5 EA → MetaTrader 5 broker account ``` This setup is useful when a trader wants TradingView alerts or Pine Script strategy messages to reach MetaTrader 5 without manually copying trades. ## What the MT5 EA Needs Before using the EA, the trader needs: - MetaTrader 5 installed on Windows - an AlgoWay account - a MetaTrader 5 webhook created in the AlgoWay dashboard - the AlgoWay webhook UUID - permission to run Expert Advisors - permission to load DLL files The EA does not need the full webhook URL inside MT5. It needs the webhook UUID, because the UUID identifies which AlgoWay route belongs to that MT5 terminal. ## Installation Flow The normal setup flow is: 1. Create a MetaTrader 5 webhook in AlgoWay. 2. Download the AlgoWayWS-MT5 installer. 3. Close MetaTrader 5 before installation. 4. Run the installer. 5. Open MetaTrader 5. 6. Enable algorithmic trading. 7. Enable DLL imports. 8. Attach AlgoWayWS-MT5 to any chart. 9. Paste the AlgoWay webhook UUID into the EA inputs. 10. Check the MT5 Experts tab for connection messages. 11. Send a small test command before live trading. ## Required MT5 Options In MetaTrader 5, open: ```text Tools → Options → Expert Advisors ``` Enable: ```text Allow algorithmic trading Allow DLL imports ``` These options are required because the EA must be allowed to run and use the WebSocket DLL connection. ## Small Test JSON After the EA is connected, a small test command can be sent through AlgoWay: ```json { "platform_name": "metatrader5", "ticker": "EURUSD", "order_contracts": 0.01, "order_action": "buy" } ``` The result should be checked in two places: - [AlgoWay Webhook](https://algoway.trade) Logs - MT5 Experts / Journal tabs AlgoWay logs confirm that the webhook was received and routed. MT5 logs confirm whether the terminal accepted or rejected the execution. ## TradingView Alert Example Once MT5 is ready and the EA connection is confirmed, TradingView can send a webhook message such as: ```json { "platform_name": "metatrader5", "ticker": "{{ticker}}", "order_contracts": "{{strategy.order.contracts}}", "order_action": "{{strategy.market_position}}", "price": "{{close}}" } ``` This connects a TradingView strategy alert to MetaTrader 5 execution through AlgoWay. ## Common Setup Problems Common installation problems usually come from: - EA file not appearing in MT5 Navigator - DLL imports disabled - missing WebSocket DLL - missing Microsoft Visual C++ runtime - wrong webhook UUID - MT5 Algo Trading disabled - symbol not available in Market Watch - invalid TradingView JSON body ## Full Installation Guide Full AlgoWayWS-MT5 installation guide: https://docs.algoway.trade/docs/metatrader-5/ws-ea-installation/