Download MetaTrader 5

Changing MQL4 setting for Push Notification from inside EA

To add comments, please log in or register
kadirergun
13
kadirergun  

Hi everyone,

During EA execution, I want to change the Push Notification Setting for MQ4L to Yes to be able to send out myself an immediate notification then take it back to No all from inside EA. That way, I hope I would prevent continuous notification alerts to my mobile phone for unwanted trade operations. Therefore, by default, I intend to keep it off, and make it on temporarily when I need a notification, then back it off again. e.g I only want to get notified when my order is opened not on every modification...

 How to do that? Many thanks.

PS: I use MQL4 not MQL5, if your solution is only for MQL5 I won't be able to use it.

Marco vd Heijden
Moderator
5955
Marco vd Heijden  

Well you could use a button for that for example this one:

OBJ_BITMAP_LABEL


https://www.mql5.com/en/docs/constants/objectconstants/enum_object/obj_bitmap_label

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_BITMAP_LABEL
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_BITMAP_LABEL
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_BITMAP_LABEL - Reference on algorithmic/automated trading language for MetaTrader 5
Keith Watford
Moderator
10541
Keith Watford  
e.g I only want to get notified when my order is opened not on every modification...
Send the notification only when an order is opened, not when it is modified.
kadirergun
13
kadirergun  
Keith Watford:
Send the notification only when an order is opened, not when it is modified.
But MQL4 generates an automatic push notification if the setting is set to on in MQL4 settings before running EA., and when any trade operation occurs. I think it is not optional; that is, it is not under my control. I don't think I got what you mean. Any script sample for your solution?
Moreover, if I set the setting off befor e running EA, then I cannot send out any notification to my mobile. That's why I need to know changing the setting programmatically during EA execution.
Marco vd Heijden
Moderator
5955
Marco vd Heijden  

Yes it is under your control you can disable notify of trade transactions and then add the notify to your code where you want it to notify you and additionally an on and off button on the chart.


kadirergun
13
kadirergun  
Marco vd Heijden:

Yes it is under your control you can disable notify of trade transactions and then add the notify to your code where you want it to notify you and additionally an on and off button on the chart.


My ill-interpretation of the buttons and what they do... many thanks...
To add comments, please log in or register