How to send a message to Telegram from EA RB MoI
How to send a message to Telegram from EA RB MoI
First of all you have to add "https://api.telegram.org" to WebRequest as shown in the picture.
First of all you have to add "https://api.telegram.org" to WebRequest as shown in the picture.
After that you have to create a TELEBOT to get a Bot Token and create a channel to get a Chat ID as shown in the following image:
To find out how, click on the following Youtube Tutorial:
After that, set the position of the chart whose image you want to send to Telebot and set the Size_Width and Size_Height for the size of the screenshot image.
After all the setup is complete, now we set the message to the telegram.
Here is a list of functions that can be used to send messages when opening a position, for MT4 and Mt5:
[1]: Gets the current currency pair symbol (for example, "EURUSD").
[💱 Symbol = GBPUSD 💱]
[2]: Gets the ticket number (ID) of the current order.
[🎫 Ticket = 803157172 🎫]
[3]: Gets the TimeFrame on the Chart.
[⏰ TimeFrame = PERIOD_H1 ⏰]
[4]: Gets the current order type, either "BUY" or "SELL". If not one of the two, it will return "UNKNOWN".
[🔴 OrderType = SELL 🔴][🔵 OrderType = BUY 🔵]
[5]: Gets the current order lot amount in two-digit decimal format.
[📊 OrderLots = 0.01 📊]
[6]: Gets the price value when the position is opened.
[💹 OpenPrice = 1.311000 💹]
[7]: Gets the Take Profit order level in five-digit decimal format.
[🎯 TakeProfit = 1.313000 🎯]
[8]: Gets the Stop Loss order level in five-digit decimal format.
[❌ StopLoss = 1.299000 ❌]
[9]: Gets the current price (bid price) of the current symbol in five-digit decimal format. [🚩 ClosingPrice = 1.311500 🚩]
[10]: Gets the current profit from the order in two-digit decimal format.
[💵 Profit = $ -0.23 💵]
[11]: Gets the comment from the order. [📣 OrderComment = EA RB MoI v.X.X 📣]
[12]: Gets the order swap value in two-digit decimal format.
[💰 OrderSwap = 0.00 💰]
[13]: Gets the order commission value in two-digit decimal format.
[💳 OrderCommission = 0.00 💳]
[14]: Gets the order opening time in date and minute format.
[🕓 OpenTime = 2024.09.04 11:19 🕓]
[15]: Gets the "magic" number of the order (usually used to identify orders created by Expert Advisors).
[🔮 OrderMagic = 1 🔮]
[br]: Adds a new line.
[_]: Replaces underscore (_) with space.
If there is no word in the function list then EA will send a message according to the word given
For example if you want to receive a message when opening a position like the following
then what must be written in the "Message For Open Position" menu is
[1],[2],[3]
then what must be written in the "Message For Open Position" menu is
[1],[2],[3],[4],[5],[6],[7],[8]
Here is a list of functions that can be used to send messages when closing a position, for MT4 and MT5:
[1]: Get the currency pair symbol of the closed order
[💱 Symbol = GBPUSD 💱]
[2]: Get the ticket number (ID) of the closed position
[🎫 Ticket = 803157172 🎫]
[3]: Get the order type of the closed position
[🔴 OrderType = SELL 🔴][🔵 OrderType = BUY 🔵]
[4]: Get the amount of profit or loss from the closed position
[💵 Profit = $ -0.33 💵]
[5]: Get the number of lots from the closed position
[📊 OrderLots = 0.01 📊]
[6]: Get the time when the position was closed
[🕓 CloseTime = 2024.09.04 11:20 🕓]
[7]: Takes the opening price of a closed position
[💹 OpenPrice = 1.311000 💹]
[8]: Takes the closing price of a closed position
[📈 ClosePrice = 1.299000 📈]
[9]: Takes the commission of the last closed position
[💳 Commission = 0.00 💳]
[10]: Takes the swap value of a closed position
[💰 Swap = 0.00 💰]
[br]: Adds a new line
[_]: Replaces underscore with space.
Then Use this word
[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[br],[br], Sayang Sekali anda Loss !!!...
Example if you want to receive a message when opening or closing a position but the condition is Profit
Then Use this word
[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[br],[br], Selamat Anda Profit !!!...
SENDING MESSAGES WITH EMOJI !!!!...
open the Unicode Converter link above
Here there are 2 different ways to give Emoji messages between MT4 and MT5 for Scripting Encoding reasons, where there are differences in Encoding between Mt4 and Mt5: How to do it for Mt4? .... If you use Mt4 then Copy paste the column with the Green arrow to EA then do a Test to telegramDone ...
select 1 emoji, here I will take the dragon emoji and copy paste the dragon image
Here there are 2 different ways to give Emoji messages between MT4 and MT5 for Scripting Encoding reasons, where there are differences in Encoding between Mt4 and Mt5: How to do it for Mt4? .... If you use Mt4 then Copy paste the column with the Green arrow to EA then do a Test to telegramDone ...
How to do it for Mt5? ....
If for mt4 we choose the green column, then for mt5 we choose the blue column, the example above with the value "u + 0001f432" .. from that value we take the last 4 digits, namely "f432" and we add Syntax
"[{0x<4 last digits>}] so the value is [{0xf432}] and we add it to the input column in Mt5 as shown in the following image
Done ... :')
Done ... :')
Komentar
Posting Komentar