This way 5 years ago.
Is this possible to do now from a code?
If not, is there any workaround? I can pay for solution. Please give me some info
This way 5 years ago.
Is this possible to do now from a code?
If not, is there any workaround? I can pay for solution. Please give me some info
If you have codes running, why not let the code do the alerting directly? Is there some special reasons I don't know of? (just curious... LOL)
Hi Seng,
well I don't know, I have a working EA that is opening market orders and it sets TP and SL for each order. Now I need to automatically create Alerts in "Alerts tab" for each new opened position - one alert to notify me via Email(+ run .bat file) when the TP price is reached, and the other alert when SL is reached.
See images:
Note that I need actual price values in alerts below, based on TP and SL prices above
well I don't know, I have a working EA that is opening market orders and it sets TP and SL for each order. Now I need to automatically create Alerts in "Alerts tab" for each new opened position - one alert to notify me via Email(+ run .bat file) when the TP price is reached, and the other alert when SL is reached.
Note that I need actual price values in alerts below, based on TP and SL prices above
Right... I believe emails/batch files can all be triggered via code, directly, without going through the alert tab.
But let's see what the experts say about this :).
Hi Seng,
well I don't know, I have a working EA that is opening market orders and it sets TP and SL for each order. Now I need to automatically create Alerts in "Alerts tab" for each new opened position - one alert to notify me via Email(+ run .bat file) when the TP price is reached, and the other alert when SL is reached.
If you have source code of EA you can modify it to add alerts and call external programs. If you don't have the source you can write simple indicator that will do this job. In either case integration with alerts tab in MT4 is not required.
Hi Support
There is a function to insert directly from code an Alert, just like the image here in the bottom?
Thanks for reply
https://www.mql5.com/en/forum/308961
send CellPhone for SMS
//+------------------------------------------------------------------+ //| HaskayafxDayiSMSKontrolEA.mq4 | //| Copyright 2018, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2018, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict bool start = true; int ToplamOrder=0; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { ToplamOrder=OrdersTotal(); //OnSMSKontrol(); // OnSMSGonder("MT4 MESAJ"); //--- create timer // EventSetTimer(60); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer //EventKillTimer(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { string Mesaj=""; if(ToplamOrder!=OrdersTotal()) { Mesaj="Old Order Count:"+ToplamOrder+" New Order Total:"+OrdersTotal(); ToplamOrder=OrdersTotal(); OnSMSGonder(" Total Orders Changed!."+Mesaj); } } //+------------------------------------------------------------------+ void OnTimer() { //--- // Print("sds"); } //+------------------------------------------------------------------+ void OnSMSGonder(string GlnMesaj) { string cookie=NULL,headers; char post[],result[]; int res; // Please Change Your SMS company. this example Turkish SMS companty vatanss.com string google_url="http://panel.vatansms.com/panel/smsgonder1N.php?kno=XXXXXX&kul_ad=0xxxxxxxx&sifre=xxxxxxxx&gonderen=abcbadba&mesaj="+GlnMesaj+"&numaralar=444444444&tur=Normal"; ResetLastError(); int timeout=5000; res=WebRequest("GET",google_url,cookie,NULL,timeout,post,0,result,headers); //--- Checking errors if(res==-1) { Print("Error in WebRequest. Error code =",GetLastError()); //--- Perhaps the URL is not listed, display a message about the necessity to add the address MessageBox("Add the address '"+google_url+"' in the list of allowed URLs on tab 'Expert Advisors'","Error",MB_ICONINFORMATION); } }

- 2019.03.30
- www.mql5.com
Marcin, yes I have. But I don't know how to code. Do you code? I can pay.
Using WebRequest
- Igor Grgic: I can pay.Top of every page is the link Freelance.
int OnInit(){ ToplamOrder=OrdersTotal();
Don't try to use any price or server related functions in OnInit (or on load,) as there may be no connection/chart yet:- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- New tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi Support
There is a function to insert directly from code an Alert, just like the image here in the bottom?
Thanks for reply