Automate TradingView Strategy to MT5

mt5

Automating TradingView alerts to MT5 is now very simple and possible thanks to the Tradingview to Anywhere tool. The bot uses human-like commands that can be combined with TradingView’s dynamic alert messages.

After creating your TradingView to Mt5 setup, and sending a test to make sure it is running successfully, it is now time to connect to TradingView and start automating the alerts generated by your strategy. Paste the Webhook received on the Webhook URL field of the alerts and format the commands on the message box as follows:

Automating TradingView Strategy to MT5
Use either {{strategy.order.action}} - which returns the string “buy” or “sell” for the executed order or {{strategy.market_position}} - which returns the current position of the strategy in string form: “long”, “flat”, or “short”. Specify the pair symbol, and quantity, and at this point, you can add other TradingView to Anywhere commands as provided for in the list of commands such as take profits, stop loss, trailings and so on. For Example, *{{strategy.order.action}} {{ticker}} Q=0.03 tp=400 sl=200 will buy/sell 0.03 lots of EURUSD and place your take profit and stop loss 400 and 200 points away respectively.
For brokers with symbol extensions, remember to include them in the syntax after the symbol or in the EA settings. Example {{ticker}}pro.

Automating TradingView Indicator to MT5
To automate an indicator, select the indicator as the condition, choose long or short condition, select once per bar to avoid repainting issues, and input the applicable buy/sell command in the message field. For example, if you choose a long condition above, the command will be Buy EURUSD Q=0.03 tp=1.22460 sl=1.04450=usdm to long 0.03 lots of EURUSD with take profit placed at the 1.22460 price level and stop-loss at 1.04450 price level. A short condition will follow the same process but this time it would be Sell.

That’s all, it is that simple! It’s how everything is meant to be here at TradingView To Anywhere :slight_smile: