MT5, sound on closing position

Marco Montemari  

Hi there, when a position is closed ( for reaching TP or SL) I would like to hear a notification. Is it possible?

Thanks

Vladimir Karputov  
Marco Montemari :

Hi there, when a position is closed ( for reaching TP or SL) I would like to hear a notification. Is it possible?

Thanks

I did the output of messages ( PlaySound , Push) - if the position is closed: Sound Alert Entry Out . If you need Alert exactly when SL or TP is triggered, you need to slightly change the code.

Sound Alert Entry Out
Sound Alert Entry Out
  • www.mql5.com
CloseOrdersBySymbolByType The script deletes all orders of the type specified in settings, on the current symbol. CloseAllOrders The script deletes all pending orders on all symbols at a time. CandleDifference The indicator displays the change in price as a...
Marco Montemari  
Vladimir Karputov:

I did the output of messages ( PlaySound , Push) - if the position is closed: Sound Alert Entry Out . If you need Alert exactly when SL or TP is triggered, you need to slightly change the code.

Thanks. It is absurd platform hasn't this option :/
They put: send notifications on every trade, soni receive on phone notifications even when the sl is updated by trailing stop: orribe...

My idea keeps to be valid: to create a good product you must use it .
Thanks for your script i Will use it
Mostafa Pourmorad  
Mostafa Pourmorad #:
This is cool
could be changed so that different sounds be played for limit and stop hits?
can we add custom sound files (myalert.wav)? (their size is less than 0 KB and duration about 0 seconds!)
I got it. just need to check if(deal_profit > 0) PlaySound(filename);
Reason: