36.9 F
New York
Friday, December 8, 2023

How-To: Automate Notifications from MetaTrader to Telegram – Trading Ideas – 10 May 2023

Must read

Share Me


Are you looking for a way to send automated notifications from MetaTrader to a Telegram channel? Here is your step-by-step guide:

  1. Pick the product that matches your version of MetaTrader:

       [MT5]                [MT4]

  • Enable MetaTrader to send web requests to Telegram:
    “Tools” menu → “Options” → “Expert Advisors” → check “Allow WebRequest for listed URL” and add “https://api.telegram.org

  • If you don’t have one yet, create a Telegram Bot and a Channel (see detailed instructions below)

  • Attach the utility to the chart you want to monitor (or simply drag-and-drop on top of the chart area)

  • In the Inputs section, enter the Discord Webhook and customize the settings to get notified when and how you prefer

  • Creating a TelegramBot and finding a channel’s id:

    1. Open your Telegram APP and search for “BotFather”

    2. Type “/start” and then “/newbot” to create a new bot

    3. Give your bot a nickname and username

    4. Congratulations! You have created your Telegram bot

    5. Save your bot API token, this will be an input to the utility

    6. If you don’t already have one, create the channel or group

    7. Open the channel/group Info, then Manage, Add Administrators, type the bot username, and click Save

    8. Log in with your account to Telegram web and open the above channel/group. In the URL of your web browser you should see something similar to https://web.telegram.org/k/#-XXXXXXXXX

    9. Copy the chat id (the last part of the URL, i.e., -XXXXXXXXX)


    General Settings

    • Telegram Bot API Token: from the above steps

    • Telegram Chat Id: from the above steps

    • Magic numbers filter:

      • Enter a comma-separated list of magic numbers (e.g., “11111, 22222, 33333”)

      • Or use “ALL” to avoid filtering

    • Symbol filter

      • Enter a comma-separated list of symbols (e.g., “EURUSD,GOLD,[DJI30]”)

      • Or use “ALL” to avoid filtering

    • Time format: pick your preferred format

    • Force pip value: force your own pip value

    • Pip value: custom pip value


    Screenshot Settings

    Messages Formats

    • Customize your message in this section

    • You can enter a mix of text and placeholders to build your messages

    • Use “\n” for a new line

    • Placeholders are all capitalized and will be replaced with the corresponding order information. You can use the you can use the following data points:

      • [TYPE] → Order type

      • [TIME] → Time stamp for the corresponding change in state (created, modified, etc.)

      • [SYMBOL] → Order symbol

      • [TICKET] → Order ticket

      • [SL] → Order stop loss

      • [TP] → Order take profit

      • [SLPIP] → Order stop loss in pips

      • [TPPIP] → Order take profit in pips

      • [ENTRY] → Entry price

      • [RRR] → Risk to reward ratio

      • [LOTSIZE] → Lot size

      • [PROFIT] → Trade profit

      • [PROFITPIP] → Profit in pips

      • [REASON] → Order reason

      • [RISK] → Risk involved in trade   

      • [RISKACCOUNTPERCENTAGE] → Risk involved in trade based on account percentage

    Happy trading!


    Source link

    - Advertisement -spot_img

    More articles


    Please enter your comment!
    Please enter your name here

    Latest article