Pavamana
A TradingView to MetaTrader 5 automation system built around a multi-indicator confluence strategy, with webhook signal routing, VPS hosting, and ATR-based risk management.
A multi-indicator confluence strategy on XAUUSD, automated from TradingView signal detection to MetaTrader 5 execution on a VPS
The Brief
The client had a manually tested confluence strategy for XAUUSD, combining signals from three TradingView indicators. All three had to align for an entry to be valid. The goal was to automate this from signal detection in TradingView to trade execution in MetaTrader 5, running on a VPS.
What We Built
Signal Aggregation and Webhook Pipeline Each indicator on TradingView fires an alert when its condition is met. These alerts are routed via webhooks through an Ngrok tunnel to a Python server running on a VPS. The server aggregates the incoming signals and determines whether all entry conditions are satisfied before passing the instruction to the MT5 Expert Advisor.
MetaTrader 5 Expert Advisor The EA receives the aggregated signal and handles all trade execution. Entry logic supports both market orders at bar close and pending orders placed at a configurable distance from price, with a 30-minute expiry. Risk management uses ATR(14) as the basis for stop loss and take profit sizing, with a configurable multiplier. Position size is calculated as a percentage of account balance. The EA enforces a single active trade rule: no new entries while a trade is open. It also includes a daily loss limit that pauses trading after three consecutive losses, persisting across EA restarts.
Dynamic Take Profit The EA includes a dynamic TP adjustment: when price reaches 80% of the original take profit level, it recalculates the target based on the current ATR, allowing the trade to capture more profit if momentum continues. A manual deactivation option lets the client pause the system on demand.
VPS Infrastructure The system runs as a persistent service on an Ubuntu VPS, automatically restarting on server reboot.
Results
The system runs continuously on a VPS, executing the client’s confluence strategy on XAUUSD without manual involvement.
Interested in a similar project?
Get in touch