• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 3:48pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 3:48pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

ECN && STP && Scalping && Hedging - Broker Review - Oct 2009 24 replies

MT4 can't send email notification with hMailServer 0 replies

MT4 E-Mail Notification 4 replies

Meta Trader SMS notification 2 replies

Mobile notification of your emails (Yahoo/Hotmail) 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 37
Attachments: Send notification from MT 4 & 5 to Telegram
Exit Attachments
Tags: Send notification from MT 4 & 5 to Telegram
Cancel

Send notification from MT 4 & 5 to Telegram

  • Last Post
  •  
  • Page 1 23456 10
  • Page 1 234 10
  •  
  • Post #1
  • Quote
  • First Post: Edited Aug 11, 2018 10:35am Mar 16, 2018 4:38am | Edited Aug 11, 2018 10:35am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Hi, there!

Here instruction how to send notification to telegram
1. Get Token tmsrv_bot
2. Copy function tms_send() or include tmsrv.mqh
3. Paste your token:
Inserted Code
bool tms_send(string message, string token="YOUR_TOKEN_HERE")

Usage example:
Inserted Code
void OnTick(){ //%
 
   if(iRSI(NULL,0,14,PRICE_CLOSE,1)>30
      && iRSI(NULL,0,14,PRICE_CLOSE,0)<30) {
      
      tms_send(StringFormat("%s RSI is oversold - time to BUY",Symbol()));    
   }
  
   if(iRSI(NULL,0,14,PRICE_CLOSE,1)<70
      && iRSI(NULL,0,14,PRICE_CLOSE,0)>70) {
      
      tms_send(StringFormat("%s RSI is overbought  - time to SELL",Symbol()));
   }
}

For sure you can use official telegram API, but believe me, that's a pain in the ass when you use it in different projects only just for sending alerts.

I have made tmsrv.pw for my own needs, but decided to share - now a project in development.
Please write if you find a bug or you need some functionality.

Bot commands:
Quote
Disliked
/pause - Pauses sending messages
/play - Resumes sending messages
/token - Send your token
/last - Send 5 last messages
/now - Set bot's working time interval

*
/now not possible to use from the command list, telegram not supported command with parameters
you have to type it see format below:
/now {back} {forward} - set sending time interval form now

Example:
/now -2 6 sending time interval will be set
hour_form = hour_current - 2
hour_to = hour_current + 6
  • Post #2
  • Quote
  • Mar 19, 2018 8:00am Mar 19, 2018 8:00am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Forget to say you have to add API URL to Options -> see picture:
Attached Image
 
3
  • Post #3
  • Quote
  • Mar 24, 2018 4:06am Mar 24, 2018 4:06am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Here is demo EA

1. add URL( https://tmsrv.pw/send ) to Allowed see post above
2. Paste your token directly to function parameter:
Attached Image


Here MQL4 script:
Attached File(s)
File Type: mq4 demo_tmsrv.mq4   5 KB | 4,961 downloads
 
3
  • Post #4
  • Quote
  • Mar 24, 2018 5:41am Mar 24, 2018 5:41am
  •  vijiragavan
  • Joined Aug 2016 | Status: Member | 195 Posts | Online Now
thanks for the script.. working.. will test on monday
Still learning. Telegram @jtprabu
 
 
  • Post #5
  • Quote
  • Apr 15, 2018 4:13am Apr 15, 2018 4:13am
  •  Liovannix
  • | Commercial Member | Joined Sep 2015 | 433 Posts
Another options:
1. https://storebot.me/bot/email2telegrambot
Email2Telegram creates a special [email protected] email address. So you ust have to use this email in your normal to address in the mt email setup

2. https://t.me/gmailbot
This will alow you to fully manage your linked gmail account. So your mt4 receiving gmail address will forward also to your telegram.
 
 
  • Post #6
  • Quote
  • Apr 26, 2018 5:22am Apr 26, 2018 5:22am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Liovannix
Disliked
Another options: 1. https://storebot.me/bot/email2telegrambot Email2Telegram creates a special [email protected] email address. So you ust have to use this email in your normal to address in the mt email setup 2. https://t.me/gmailbot This will alow you to fully manage your linked gmail account. So your mt4 receiving gmail address will forward also to your telegram.
Ignored
That is true, it is also a good way to send a notification. I don't like work with emails and the main reason why I made this service it is simple integration in each programming language and I can add any functionality I need.
 
 
  • Post #7
  • Quote
  • Apr 26, 2018 10:11am Apr 26, 2018 10:11am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
I'm curious why you are using an unknown third party middleman to relay your messages? Why not just use the telegram api?
 
2
  • Post #8
  • Quote
  • May 17, 2018 3:19am May 17, 2018 3:19am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Nicholishen
Disliked
I'm curious why you are using an unknown third party middleman to relay your messages? Why not just use the telegram api?
Ignored
Here several reasons:
- To integrate and testing telegram API you need 2-14 days depends on a programmer and knowledge
- To integrate tmsrv you need 1 - 30 minutes
- It is not necessary to create "millions" bots only for notifications more easy use some service
- If you need notification from different programming languages it is very difficult to support all codes, more easy use of standard simple API.
....
For example, I use some service to posting on FB and twitter I can learn FB API and Twitter API, but my task can be solved buy that service faster and with minimum coding.

For sure sometimes I use the native service API it depends on tasks.

You can use whatever you want, this is just another option for you.
 
 
  • Post #9
  • Quote
  • Aug 1, 2018 6:05pm Aug 1, 2018 6:05pm
  •  Impenia
  • Joined Nov 2015 | Status: Member | 121 Posts
Quoting AleksandrM
Disliked
Here is demo EA 1. add URL( https://tmsrv.pw/send ) to Allowed see post above 2. Paste your token directly to function parameter: {image} Here MQL4 script: {file}
Ignored
How do I add price to the tms_send function? Would like to send the price which the signal happens to Telegram.
Simplicity Is The Ultimate Sophistication!
 
 
  • Post #10
  • Quote
  • Aug 2, 2018 6:38am Aug 2, 2018 6:38am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Impenia
Disliked
{quote} How do I add price to the tms_send function? Would like to send the price which the signal happens to Telegram.
Ignored
You just have to add it inside a message.
Try this:
Inserted Code
tms_send(StringFormat("Signal BUY \n%s: %s",Symbol(),DoubleToStr(Bid,Digits)),{TOKEN});

You will see a message like this:
Quote
Disliked
Signal BUY
USDJPY: 111.481
 
 
  • Post #11
  • Quote
  • Aug 2, 2018 8:16am Aug 2, 2018 8:16am
  •  Impenia
  • Joined Nov 2015 | Status: Member | 121 Posts
Quoting AleksandrM
Disliked
{quote} You just have to add it inside a message. Try this: tms_send(StringFormat("Signal BUY \n%s: %s",Symbol(),DoubleToStr(Bid,Digits)),{TOKEN}); You will see a message like this: {quote}
Ignored
Thanks bro for the response. One other question - can I forward message to a Telegram channel? If so, how do I get the Telegram channel Token? Alternatively, is it possible to send message to multiple Telegram users? Thanks.
Simplicity Is The Ultimate Sophistication!
 
 
  • Post #12
  • Quote
  • Aug 3, 2018 12:46am Aug 3, 2018 12:46am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Impenia
Disliked
{quote} Thanks bro for the response. One other question - can I forward message to a Telegram channel? If so, how do I get the Telegram channel Token? Alternatively, is it possible to send message to multiple Telegram users? Thanks.
Ignored
You have to add bot to channel

  1. Open Channel info (in app title)
  2. Choose Administrators.
  3. Add Administrator.
  4. There will be no bots in contact list, so you need to search for it. Enter your bot's username.
  5. Clicking on it you make it as administrator.

 
 
  • Post #13
  • Quote
  • Aug 3, 2018 3:38am Aug 3, 2018 3:38am
  •  Impenia
  • Joined Nov 2015 | Status: Member | 121 Posts
Quoting AleksandrM
Disliked
{quote} You have to add bot to channel Open Channel info (in app title) Choose Administrators. Add Administrator. There will be no bots in contact list, so you need to search for it. Enter your bot's username. Clicking on it you make it as administrator.
Ignored
Thanks for your response. I'd like to believe the bot you are referring to is the tmsrv.pw bot. Tried to add it and got the error message on the screenshot.
Attached Image (click to enlarge)
Click to Enlarge

Name: Screenshot_20180803-083523.png
Size: 92 KB
Simplicity Is The Ultimate Sophistication!
 
 
  • Post #14
  • Quote
  • Aug 3, 2018 4:21am Aug 3, 2018 4:21am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
I suppose you try to add the bot to a group, it is not possible as I know.

You can add bot only to channel. Recorded video - how to add it: https://streamable.com/70512
 
 
  • Post #15
  • Quote
  • Aug 7, 2018 12:35pm Aug 7, 2018 12:35pm
  •  pijifx
  • | Joined Aug 2006 | Status: Member | 5 Posts
how to send to telegram every trade open/modify and trade close?
 
 
  • Post #16
  • Quote
  • Aug 10, 2018 3:19am Aug 10, 2018 3:19am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting pijifx
Disliked
how to send to telegram every trade open/modify and trade close?
Ignored
Do you trade manual or using your AE?
do you have EA's sources? if yes just include tms_send() to open and modify a function

mt4 or mt5?
 
 
  • Post #17
  • Quote
  • Aug 10, 2018 10:32am Aug 10, 2018 10:32am
  •  MrFANKA
  • | Joined Aug 2018 | Status: Junior Member | 4 Posts
1) CopyPasted the Function in my Indicator
2) Edited the Token like {MyToken}
3) Added "https://tmsrv.pw/send" in MT4 WebRequest list
4) tms_send(StringFormat("%s RSI is overbought - time to SELL",Symbol()));
Dont receive anything anywhere.

I am new in Telegram, can somebody help me?
 
 
  • Post #18
  • Quote
  • Aug 10, 2018 12:03pm Aug 10, 2018 12:03pm
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting MrFANKA
Disliked
1) CopyPasted the Function in my Indicator 2) Edited the Token like {MyToken} 3) Added "https://tmsrv.pw/send" in MT4 WebRequest list 4) tms_send(StringFormat("%s RSI is overbought - time to SELL",Symbol())); Dont receive anything anywhere. I am new in Telegram, can somebody help me?
Ignored
Standart mql function webrequest not working in indicators, give me a couple of days, I will provide a solution for indicators
 
 
  • Post #19
  • Quote
  • Aug 11, 2018 5:28am Aug 11, 2018 5:28am
  •  TrillionMind
  • | Commercial Member | Joined Mar 2018 | 14 Posts
is there anyway of reversing the whole process..i mean being able to place trades in mt4 using signals recieved in telegram
''If its BULLSHIT when automated trading it manually is STUPIDITY''
 
 
  • Post #20
  • Quote
  • Aug 11, 2018 7:33am Aug 11, 2018 7:33am
  •  Impenia
  • Joined Nov 2015 | Status: Member | 121 Posts
Quoting AleksandrM
Disliked
I suppose you try to add the bot to a group, it is not possible as I know. You can add bot only to channel. Recorded video - how to add it: https://streamable.com/70512
Ignored
You were right bro. I was trying to add it to Group. I've now successfully added the bot to Channel now but can't seem to get alerts to the Channel. Seems I'm not able to get the bot started in the Channel.
Simplicity Is The Ultimate Sophistication!
 
 
  • Platform Tech
  • /
  • Send notification from MT 4 & 5 to Telegram
  • Reply to Thread
    • Page 1 23456 10
    • Page 1 234 10
1 trader viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023