Ofir Notify for Telegram Light edition
- 实用工具
- Gad Benisty
- 版本: 2.0
- 更新: 23 四月 2024
NEW : integration with Ofir Signals to send personalized alerts
Ofir Notify is a tool which send alerts on trades to Telegram- Alert on any event concerning a position : Opening, Closing, modification (SL, TP)
- Send alerts to Chats, Groups and Channel
- Alert on Equity change
- Display Risk, Reward and progress of profit/lost for each position
- Customization of alerts
- Sending charts screenshots with alerts
- Send signals from your indicators or experts
- Multi-lingual
- NEW : version 2 brings integration with Ofir Signals to send personalized alerts to your channel subscribers. Position sizes are calculated for each user, taking into account its level of risk. read more
More info in my Blog
Ofir Notify Setup instruction
- Open Telegram 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
- Ofir Notify 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
All other settings are made directly by using the application from Telegram. More info in my Blog
Customization
Ofir Notify enables to customize the alerts sent to Chats or Channel.
This is based on using text files as templates.
Example of customization file:
#rocket#TRADE CLOSED ID=#ticket# #buy##type#: #symbol# #ilots#Lots: #lots# #iprice#Entry price: #price# ------------------- #closed#Close price: #closedprice# #gain#WIN: #profit%# #iprofit# Profit: #profit# ------------------- #coeur##billet#CONGRATULATION #billet##coeur# #thanks# [MYIB24703143](https://panthe....) #telegram#[Support Telegram](https://t.me/....)
List of keywords to be used in template files | ||
Keyword | Description | Example |
---|---|---|
#ticket# | ticket numer | 123456789 |
#symbol# | symbol | EURUSD |
#flag# | symbol flag | |
....AND MUCH MORE (Blog) |
Sending screenshots
This feature enables to send chart screenshots with an alert in order to show Opening or Closing positions in a chart.
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>/OfirNotify/<Your trading account Number/Inbox
You can use the following code in your indicator or EA:
string directory="Ofir Notify/"+IntegerToString(AccountInfoInteger(ACCOUNT_LOGIN))+"/Inbox"; 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); }
Good Good Good !!!!!!