Forex: Tradingview To Anywhere

For autotrading forex signals we have different options. Please keep in mind that all options require one or more third party service(s) to be purchased separately.

There are programs that can read Tradingview alerts directly using their own predefined syntax like https://tradingview.to/ For the syntax please see here https://tradingview.to/mt4

Go to https://tradingview.to/anywhere and select MT4 or MT5 (depending on which version you use). Then press CONNECT.
MT4:
meta trader 4 (MT4)
MT5:
MetaTrader 5 (MT5)
When we start the setup guide we need to create a bot through botfather first.
first create your bot
Search botfather on Telegram.
Search botfather on Telegram
And create a new bot.
And create a new bot
Give it a name and copy the API KEY.
Give it a name and copy the API KEY
Paste the key here.
in order to create a webhook paste your API key
The next step is to create a Telegram channel in order to receive the alerts.
The next step is to create a Telegram channel in order to receive the alerts
Set the necessary permissions.
Set the necessary permissions
Add the necessary admins.
Add the necessary admins
Your channel should have the following members, the bot you created with botfather and the Tradingview to Telegram bot.
Your channel should have the following members
Next we need the chatid from our Telegram chat. Type “/chatid” in the Telegram channel you just created and paste the code in the following window (don’t forget to include the minus).
Next we need the chatid from our Telegram chat
paste your chat ID with minus sign
Now we need to set up MT4/MT5 to get the alerts from Tradingview to MT4/MT5. Download the expert advisor from their Google drive.
Download the expert advisor
Download button for expert advisor
When downloaded from the Google Drive paste the UNZIPPED file (.ex4 extension) into the appropriate folder.
how to install an expert advisor on MT4
MT4 (.ex4):
MT4 on the pc
MT5 (.ex5):
open the pack
After pasting the file into the correct folder restart MT4/MT5 and go to the expert advisors window.
expert advisors window
system navigator
You can see that the EA is now listed in the list of Expert Advisors.
We can give our webhook a custom name or go with the default.
MT4:
customize your webhook with MT4
MT5:
customize your webhook with MT5
Log in to save your webhook.
Log in to save your webhook
Then double click the TradingViewToMT4 expert advisor to add it to the chart and paste your webhook URL in the appropriate field. Press OK when done.

next step is to expert -tradingviewtomt4

After this we can test to see if our webhook connection works properly.
Press the “send a test” button and the word “balance” should appear in your TG channel immediately after pressing.
MT4 interface
Success!
chatid on telegram
Now we can create an alert on Tradingview and see if it reached our Telegram channel correctly. Let’s create a quick test alert first. Login to your Tradingview account and open the chart of the forex pair you want to trade. We will first take the GER40 1 second chart.
first take the GER40 1 second chart
Create a “greather then” alert first to check if it’s sent correctly to Telegram.
Create a “greather then” alert first to check if it’s sent correctly to Telegram
Fill in the webhook you created in TradingViewtoAnywhere.
Fill in the webhook you created in TradingViewtoAnywhere
A moment later we can see the message is received in our TG channel
A moment later we can see the message is received in our TG channel
Now that this connection works we can show a syntax example in order to open the trades properly in MT4/MT5. Change the time frame to your desired setting (in this example we will take 1h TF), add the latest Algobot indicator to the chart and create your desired setup.
WARNING: The alert syntax has to reflect the Algobot setup completely in order to have the exact results, If you fail to do so the trades on the chart and the trades send to MT4/MT5 will be different.

In this example we have the following take-profits set up in Algobot.
take-profits set up in Algobot
So the alert message consists of the following parts :

  • 4TPs used (500, 1200, 1600, 2500 points which for this broker translates to 50, 120, 160, 250 index points)
    ATTENTION: Different brokers have different decimals and at one broker it could be 50 but at the other broker 500. Be sure to check this before you send the alerts!!
  • we open four trades 0.02 lot each (one trade for each TP)
  • we move SL to BE after price reaches 1200 points (TP2) and lock in 100 points profits (to cover broker costs and small profits)
BUY:

buy GER40 Q=0.02 TP=500 SL=750
buy GER40 Q=0.02 TP=1200 SL=750
buy GER40 Q=0.02 TP=1600 SL=750 TT=1200 TD=1100 TS=100000
buy GER40 Q=0.02 TP=2500 SL=750 TT=1200 TD=1100 TS=100000

SELL:

sell GER40 Q=0.02 TP=500 SL=750
sell GER40 Q=0.02 TP=1200 SL=750
sell GER40 Q=0.02 TP=1600 SL=750 TT=1200 TD=1100 TS=100000
sell GER40 Q=0.02 TP=2500 SL=750 TT=1200 TD=1100 TS=100000

For the exact syntax references please see online documentation here:
https://tradingview.to/mt4
https://tradingview.to/mt5

follow the exact syntax references
Save the alert and wait for the alert to trigger (on the 1h TF it can take a while).
Now we can see the trade opening properly in our Telegram channel.

see the trade opening properly in AlgoBot Telegram channel
And in MT4/MT5

add mt4 and mt5 to the tradingview