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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

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
  • 36
Attachments: Send notification from MT 4 & 5 to Telegram
Exit Attachments

Send notification from MT 4 & 5 to Telegram

  • Last Post
  •  
  • 1 23Page 456 10
  • 1 3Page 45 10
  •  
  • Post #61
  • Quote
  • Oct 5, 2018 5:11am Oct 5, 2018 5:11am
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting AleksandrM
Disliked
{quote} new version 1.02 {file}
Ignored
Just some friendly advice, and this may sound nitpicky, but never assume anything with MQL. Assumption with MQL has been the bane of my existence... For example you should get into the habit of passing parameters instead of assuming the order-pool will remain locked to your ticket in between function calls. So instead of this:
Inserted Code
string order_type () {
  
   if(OrderType() == OP_BUY)        return "BUY";
   if(OrderType() == OP_SELL)       return "SELL";
   if(OrderType() == OP_BUYLIMIT)   return "BUYLIMIT";
   if(OrderType() == OP_SELLLIMIT)  return "SELLLIMIT";
   if(OrderType() == OP_BUYSTOP)    return "BUYSTOP";
   if(OrderType() == OP_SELLSTOP)   return "SELLSTOP";
  
   return "";
}

You should pass the type into a parameter and perhaps do something like this.
Inserted Code
string order_type_to_str(int type)
{
   return StringSubstr(EnumToString((ENUM_ORDER_TYPE)type), 11);
}
  • Post #62
  • Quote
  • Oct 5, 2018 7:09am Oct 5, 2018 7:09am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Nicholishen
Disliked
{quote} Just some friendly advice, and this may sound nitpicky, but never assume anything with MQL. Assumption with MQL has been the bane of my existence... For example you should get into the habit of passing parameters instead of assuming the order-pool will remain locked to your ticket in between function calls. So instead of this: string order_type () { if(OrderType() == OP_BUY) return "BUY"; if(OrderType() == OP_SELL) return "SELL"; if(OrderType() == OP_BUYLIMIT) return "BUYLIMIT"; if(OrderType() == OP_SELLLIMIT) return "SELLLIMIT"; if(OrderType()...
Ignored
Yeap, that is better, I just copy/paste some functions from my old codes, some of them coded badly but working, I have no might to recode them all

I adhere to the principle: Don't touch a working system!

Thanks!
1
  • Post #63
  • Quote
  • Oct 8, 2018 6:32am Oct 8, 2018 6:32am
  •  muggle
  • | Joined Aug 2018 | Status: Member | 31 Posts
Hi,

I try to use this code add to indicator but it not work, So Could you help to advise in case if put a code to an indicator and using alert with popup alert, Thank you (I test on EA is work fine)
  • Post #64
  • Quote
  • Oct 8, 2018 1:46pm Oct 8, 2018 1:46pm
  •  MrPhu
  • | Joined Sep 2018 | Status: Junior Member | 5 Posts
[quote = AleksandrM; 11551849] {quote} Yeap, đó là tốt hơn, tôi chỉ sao chép / dán một số chức năng từ các mã cũ của tôi, một số mã được mã hóa nặng nhưng làm việc, tôi không có khả năng để mã hóa tất cả tôi tuân theo nguyên tắc: Đừng chạm vào một hệ thống làm việc! Cảm ơn! [/ Quote]

Hi AleksandrM,
you can check and fix code again, because it send double signal to telegram.
The signal at the same time it is not separated, so it sends a maximum signal to the telegram, you can setup send one by one signal to telegram, because it's will don't send wrong total profit today or don't send.
You can see picture send by me
thanks aleksandrM very much!
Attached Image (click to enlarge)
Click to Enlarge

Name: Screen Shot 2018-10-09 at 12.41.16 AM.png
Size: 330 KB
  • Post #65
  • Quote
  • Oct 9, 2018 3:36am Oct 9, 2018 3:36am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting muggle
Disliked
Hi, I try to use this code add to indicator but it not work, So Could you help to advise in case if put a code to an indicator and using alert with popup alert, Thank you (I test on EA is work fine)
Ignored
Try this
  • Post #66
  • Quote
  • Oct 9, 2018 3:41am Oct 9, 2018 3:41am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting MrPhu
Disliked
[quote = AleksandrM; 11551849] {quote} Yeap, đó là tốt hơn, tôi chỉ sao chép / dán một số chức năng từ các mã cũ của tôi, một số mã được mã hóa nặng nhưng làm việc, tôi không có khả năng để mã hóa tất cả tôi tuân theo nguyên tắc: Đừng chạm vào một hệ thống làm việc! Cảm ơn! [/ Quote] Hi AleksandrM, you can check and fix code again, because it...
Ignored
Did you change a code?
Probably you apply EA to several charts that why each EA send a message.
Today I will fix the issue with profit calculation.
  • Post #67
  • Quote
  • Oct 9, 2018 8:53am Oct 9, 2018 8:53am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting MrPhu
Disliked
Hi AleksandrM, you can check and fix code again, because it send double signal to telegram. The signal at the same time it is not separated, so it sends a maximum signal to the telegram, you can setup send one by one signal to telegram, because it's will don't send wrong total profit today or don't send. You can see picture send by me thanks aleksandrM very much! {image}
Ignored
v 1.03 fixed pips profit calculation.
Attached File
File Type: mq4 demo_tmsrv_positions_MrPhu.mq4   11 KB | 1,338 download
  • Post #68
  • Quote
  • Oct 10, 2018 12:06am Oct 10, 2018 12:06am
  •  MrPhu
  • | Joined Sep 2018 | Status: Junior Member | 5 Posts
Quoting AleksandrM
Disliked
{quote} v 1.03 fixed pips profit calculation. {file}
Ignored
Thanks AleksandrM. it's work very well.
Please help me one more time.
When it send "--open order--" or "--closed profit--" the same time, it send one post maximum word, so will don't send full infomation of signals.

Ex: like that picture, i have 4 signals "closed profit" same time and It don't send profit total day, because it reaches word limit in the telegram.

So you can code to it send : 1 signal 1 post, 4 signals at the same time - 4 posts
Attached Image (click to enlarge)
Click to Enlarge

Name: Screen Shot 2018-10-10 at 10.52.39 AM.png
Size: 232 KB
  • Post #69
  • Quote
  • Edited at 9:03am Oct 18, 2018 8:37am | Edited at 9:03am
  •  bananakid
  • | Joined Mar 2014 | Status: Member | 13 Posts
Hi Alek,

I am getting this error:
2018.10.18 12:26:34.978 demo_tmsrv_positions EURUSD,M1: tms_send() | webrequest filed - error ? 0

And the trades are not sent to Telegram anymore.

This has never happen before, any fix? Thank you.
  • Post #70
  • Quote
  • Oct 19, 2018 4:30am Oct 19, 2018 4:30am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting bananakid
Disliked
Hi Alek, I am getting this error: 2018.10.18 12:26:34.978 demo_tmsrv_positions EURUSD,M1: tms_send() | webrequest filed - error ? 0 And the trades are not sent to Telegram anymore. This has never happen before, any fix? Thank you.
Ignored
Sorry, now it fixed, SSL certificate was expired.
  • Post #71
  • Quote
  • Oct 22, 2018 3:52am Oct 22, 2018 3:52am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting MrPhu
Disliked
{quote} Thanks AleksandrM. it's work very well. Please help me one more time. When it send "--open order--" or "--closed profit--" the same time, it send one post maximum word, so will don't send full infomation of signals. Ex: like that picture, i have 4 signals "closed profit" same time and It don't send profit total day, because it reaches word limit in the telegram. So you can code to it send : 1 signal 1 post, 4 signals at the same time - 4 posts {image}
Ignored

I increased Message maximum characters to 2048, now should work properly.
  • Post #72
  • Quote
  • Oct 22, 2018 11:20am Oct 22, 2018 11:20am
  •  bananakid
  • | Joined Mar 2014 | Status: Member | 13 Posts
Quoting bananakid
Disliked
Hi Alek, I am getting this error: 2018.10.18 12:26:34.978 demo_tmsrv_positions EURUSD,M1: tms_send() | webrequest filed - error ? 0 And the trades are not sent to Telegram anymore. This has never happen before, any fix? Thank you.
Ignored

Thanks Alek.
  • Post #73
  • Quote
  • Oct 24, 2018 12:05pm Oct 24, 2018 12:05pm
  •  alfredhieu
  • | Joined Oct 2018 | Status: Member | 4 Posts
Hi AleksandrM,

Could you please add one more function?

I want to receive messages when the orders modified SL and TP value.

Thanks a lot.
  • Post #74
  • Quote
  • Oct 25, 2018 7:57am Oct 25, 2018 7:57am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting alfredhieu
Disliked
Hi AleksandrM, Could you please add one more function? I want to receive messages when the orders modified SL and TP value. Thanks a lot.
Ignored
Just, add tms_send in your modify function.
  • Post #75
  • Quote
  • Nov 8, 2018 8:51pm Nov 8, 2018 8:51pm
  •  Quinttin
  • | Joined May 2015 | Status: Member | 3 Posts
Hi guys,

This project is still working?
  • Post #76
  • Quote
  • Nov 9, 2018 1:12am Nov 9, 2018 1:12am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting Quinttin
Disliked
Hi guys, This project is still working?
Ignored
Hello!

Yes, it is still working.
  • Post #77
  • Quote
  • Nov 26, 2018 3:33am Nov 26, 2018 3:33am
  •  a2xm
  • Joined Mar 2010 | Status: Member | 441 Posts
Quoting AleksandrM
Disliked
{quote} Just, add tms_send in your modify function.
Ignored
Hi Aleksandr,

Thank you so much for this EA and Telegram bot, it's really great.
Could you please help me. I don't know how to edit the code to be able to send message when I modified the SL and/or TP values.

Again, really appreciate your work.
  • Post #78
  • Quote
  • Nov 26, 2018 8:45am Nov 26, 2018 8:45am
  •  YamilZer
  • | Joined Nov 2018 | Status: Junior Member | 1 Post
Hello guys, this forum is amazing, I´ve learned so much...
I just have 1 problem, I´m not quite sure what I'm doing wrong (kind of new in MQL)...
I mean, Bot is working, channel is getting the messages (when I open MT4 i got the activation message in the channel) but when I try to add the "tms_send" in my open and modify functions, it doesn't work...
I mean EA is still opening operations as always but is not sending messages to telegram at all, so maybe I'm doing it wrong.

here how I´m doing it:
Attached Image (click to enlarge)
Click to Enlarge

Name: Image1.png
Size: 22 KB


Thanks in advance for your help
  • Post #79
  • Quote
  • Nov 27, 2018 1:59am Nov 27, 2018 1:59am
  •  AleksandrM
  • | Joined May 2016 | Status: Member | 43 Posts
Quoting YamilZer
Disliked
Hello guys, this forum is amazing, I´ve learned so much... I just have 1 problem, I´m not quite sure what I'm doing wrong (kind of new in MQL)... I mean, Bot is working, channel is getting the messages (when I open MT4 i got the activation message in the channel) but when I try to add the "tms_send" in my open and modify functions, it doesn't work... I mean EA is still opening operations as always but is not sending messages to telegram at all, so maybe I'm doing it wrong. here how I´m doing it: {image} Thanks in advance for your help
Ignored
Hello,YamilZer!

1. See the EA logs after order opened. What is tsmrv_send() return?
2. Did you add API URL to Options? -> https://www.forexfactory.com/showthr...8#post10885978

use this code to handling errors
Inserted Code
 if(!tms_send("text " ,"token") ) { // Error Handling...  
// MessageBox("Something went wrong, check the log");
}
  • Post #80
  • Quote
  • Edited at 9:40pm Dec 12, 2018 3:54am | Edited at 9:40pm
  •  chithanh_85
  • | Joined Dec 2009 | Status: Member | 24 Posts
Hi @AleksandrM Thank you very much for your code. I am trying to test it.
Could you add notifications when the orders is modified?
And, I see that the EA calculates wrong profit. It should not calculate profit for pending order.

Attached Image

https://i.gyazo.com/7de8d0791fac8c8d...da2e5ed34c.png
SignalMHG All Time Return: 35.5%
  • Platform Tech
  • /
  • Send notification from MT 4 & 5 to Telegram
  • Reply to Thread
    • 1 23Page 456 10
    • 1 3Page 45 10
0 traders 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 / ©2021