How make an simple Alert Message

 

Hi guys, I’m new in MQL and in Forex topics, but i have a lot of experience en Visual Studio, i just want to know how do a tool to make notifications, maybe send a simple mail or msg to my phone, when my order in on S/L or in T/P, would someone can help me about this issue?

Thanks Carlos Masaya

 

MT's EA -->> your DLL(use your Visual Studio )---->>internet(someone supply SM service)--->>your phone.

MT's EA see sample of MT, check orders state, expeciall use those functions: OrderXXXXX(....)........

DLL reference MT's sample

 
DxdCn:

MT's EA -->> your DLL(use your Visual Studio )---->>internet(someone supply SM service)--->>your phone.

MT's EA see sample of MT, check orders state, expeciall use those functions: OrderXXXXX(....)........

DLL reference MT's sample


Let me understand DxdCn, exist an dll that i can control and is's connected with my accountd events (in real time), so i can work outside of MQL, and use Visual Studio, to send alerts to me about the changes in my orders.

But if i understand rigth i cant make an robot (to use an acronic), ussind the DLL, in that case, if i want to make and automatic desitions with my orders, i have to programming in MQL?, is that correct?

thank u for your Answ.

cm

 

There is a SendMail function in MQL4.

All you need outside MQL4 code is to set correct properties in your terminal to allow message sending and adjust redirecting of your e-mails to your cell phone.

All you need inside MQL4 code is to develop a function that will analyze changes on your account when total amount of positions changes and call SendMail if last closed position was closed by SL or TP.

To get it you need:

if (preHistoryTotal != OrdersHistoryTotal)

{

1. Scan all history orders

2. Find the last closed market position

3. Remember its SL, TP and Close price

4. Compare SL, TP and Close price

5. Send mail if SL is equal to Close price or TP is equal to Close price.

6. Remember new preHistoryTotal

}

Good luck.

Reason: