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:

MT5:

When we start the setup guide we need to create a bot through botfather first.

Search botfather on Telegram.

And create a new bot.

Give it a name and copy the API KEY.

Paste the key here.

The next step is to create a Telegram channel in order to receive the alerts.

Set the necessary permissions.

Add the necessary admins.

Your channel should have the following members, the bot you created with botfather and the Tradingview to Telegram bot.

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).


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.


When downloaded from the Google Drive paste the UNZIPPED file (.ex4 extension) into the appropriate folder.

MT4 (.ex4):

MT5 (.ex5):

After pasting the file into the correct folder restart MT4/MT5 and go to the expert advisors window.


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:

MT5:

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.

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.

Succes!

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.

Create a “greather then” alert first to check if it’s sent correctly to Telegram.

Fill in the webhook you created in TradingViewtoAnywhere.

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.

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


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.


And in MT4/MT5