Page 1 of 1

create Alert under AlertsTab via MT4 code after trade isOpen

PostPosted: Sat May 19, 2018 5:48 am
by blue-7777
Hello,

Is there a solution to create an Alert in MT4 Terminal window, under "Alerts" tab, thru MT4 code? I know well I can do that manually on Alerts tab, but I need to do this automatically by a code, each time when new position is opened and to put TP value (of the opened position) into my alert. Note: I know I can easily get a notification on closed positions (TP is reached), but, after position is opened I will remove TP price (AFTER creation of alert with TP price) so I can act manually on the trade later.

Thank you very much!
Best regards

Re: create Alert under AlertsTab via MT4 code after trade is

PostPosted: Sun May 20, 2018 6:15 am
by Apprentice
Your request is added to the development list under Id Number 4148

Re: create Alert under AlertsTab via MT4 code after trade is

PostPosted: Thu Jun 14, 2018 7:43 am
by Apprentice
Something like this?
trade_monitor.mq4
(4.96 KiB) Downloaded 453 times

Re: create Alert under AlertsTab via MT4 code after trade is

PostPosted: Tue Jun 19, 2018 8:59 am
by blue-7777
Apprentice wrote:Something like this?
The attachment trade_monitor.mq4 is no longer available


No, not like that, but I appreciate your effort.
This is creating pop up message for each new trade opened which is not what my request is about. I'd like to have two alerts created in terminal's "Alerts" tab automatically for each new order executed -- see attached image. One alert will be to notify me when actual TP price is reached. Second alert will notify me when actual SL price is reached. These 2 alerts in "Alerts" tab have to be reated (one for actual SL price as a "Value:", second alert for actual TP price as a "Value:") based on these inputs: "symbol" based on symbol of executed order; "action" - to be able to set/choose action like File (with path), Notification...; "Condition" will be set "Ask" oe "Bid" depending if the order was Buy or Sell and Ask>/Bid> or Ask</Bid< will depend it the alert is for TP or SL price. "Value:" will be actual Sl /TP based on *actual* Sl and TP values from the currently opened order.
(I need this because after creating of these alerts I will manually change the order's *original* SL and TP to some new values, and I need alerts to notify me when *original* SL /TP prices are reached. Obviously, before changing SL/TP I would deactivate the EA so it does not pick up my change)
I hope this description is now more clear
Thank you
Best regards

Re: create Alert under AlertsTab via MT4 code after trade is

PostPosted: Wed Jun 20, 2018 5:01 am
by Apprentice
Your request is added to the development list under Id Number 4164