Telegram Alerts for MT5
- Utilitários
- Gad Benisty
- Versão: 1.4
- Atualizado: 11 junho 2024
This application is now replaced by Ofir Notify Light Edition (Free) or Ofir Notify (paid).
Thank all for your positive feedbacks.
Telegram Alerts is a tool which send alerts on trades to Telegram
- Alert on any event concerning a position : Opening, Closing, modification (SL, TP)
- Alert on Equity change
- Display Risk, Reward and progress of profit/lost for each position
- Send signals from your indicators or experts
- Multi-lingual
If you are facing any issue using this utility, please contact me to be solved
Telegram Setup instruction
- Open your Telegram APP and search for "BotFather"
- Type /start and click/type /newbot to create a new bot
- Give your bot a nickname and username (e.g., nickname: MyNameAlerts and username: MyNameAlertsBot <-- username has to be ended by 'bot')
- Congratulations! You have created your Telegram bot.
- Save your bot API token (e.g. 1324115883:AAH2Z9PlxKX3Fce1e_m_w3AB7vA2EZZ_GAD)
- Back in MetaTrader 4, go to Tools > Options > Expert Advisors > tick 'Allowed WebRequest for listed URL' and add https://api.telegram.org.
- Attach the utility into your MetaTrader 4 chart and enter the Telegram Bot Token (from step 5)
- In Telegram open the Bot (search Bot username and start a chat with it)
- Press Start or enter /start
- You should get a message that the Chat Id is not correct. This message shows your Chat ID
- In Metatrader, open the utility properties and enter the Chat ID with the correct ID. This makes sure you are the only one who can use the Bot
- Back to Telegram, type /start . You should get information on your trading account number and equity
- Telegram Alerts is ready to work for you
Properties
- Bot Api Token: The unique token of your bot. Do not share this information.
- Chat ID: Your Telegram Chat ID
- Language: Choose English, French, Spanish or Brazilian portugues (contact me if need more)
- Rounding digits: How to display currency values. By default, digits=0, means rounded to the nearest integer (e.g 35€ instead of 35.23€)
- Alerts on events: Choose All if you want to be alerted on any events (Open, Closed and Modified). Otherwise choose Open & Closed
- Magic Numbers: Enter magic numbers (separated by space) if you want to be alerted on filtered orders (e.g generated by a robot)
- Alert Start Time: Choose the time you want to start receiving alerts (from 0 to 24)
- Alert End Time: Choose the time you want to stop receiving alerts (from 0 to 24)
- % of Equity alert: If you want to be alerted when Equity changes, enter the percentage (e.g 1 for 1%) if Equity variation. Keep 0 for not being alerted. Equity Alert works around the clock (24/24), not taking into account the Alert Start and End time parameters.
Integration with your own indicators and experts
This utility can be used by your own indicators and EA to send signals to Telegram. They just have to create a text file, containing the signal, to the following directory:
<Data Folder>/Telegram Alerts/<Your trading account Number/signals
You can use the following code in your indicator or EA:
string directory="Telegram Alerts/"+IntegerToString(AccountInfoInteger(ACCOUNT_LOGIN))+"/signals";
string filename="Test.txt";
string signal="BUY EURUSD 1.20202 SL=1.201 TP=1.203";
saveStringFile(signal,directory+"/"+filename);
bool saveStringFile(string s,string fileName)
{
int handle=FileOpen(fileName,FILE_WRITE|FILE_TXT);
if(handle==INVALID_HANDLE)
return(false);
FileWriteString(handle,s);
FileClose(handle);
return(true);
}
nice, working as expected