Download MetaTrader 5

Sound alarm on trade entry

To add comments, please log in or register
Mccallum28
353
Mccallum28  

Hi,

I would like to add an alarm on trade entry to my EA, can someone assist with the code.

Thanks

Mladen Rakic
62855
Mladen Rakic  
rg83:
Hi,

I would like to add an alarm on trade entry to my EA, can someone assist with the code.

Thanks

rg83

If you have an OrderSend() simply add alert after the successful order send

Or use something like this indicator : it alerts you whenever a new order is opened (regardless what symbol) so it is enough to attach it to just one chart and it will alert you when a new order is opened : _alerts_on_new_order_open.mq4

sebatian
676
sebatian  
mladen:
rg83

If you have an OrderSend() simply add alert after the successful order send

Or use something like this indicator : it alerts you whenever a new order is opened (regardless what symbol) so it is enough to attach it to just one chart and it will alert you when a new order is opened : _alerts_on_new_order_open.mq4

Why does it alert me two times sometimes?

Mladen Rakic
62855
Mladen Rakic  
sebastianK:
Why does it alert me two times sometimes?

because of multiple ticks on same second (metatrader saves order open time in seconds and keeps current time in seconds)

This one solves it (it will alert on a first incoming tick) : _alerts_on_new_order_open_1.01.mq4

sebatian
676
sebatian  
mladen:
because of multiple ticks on same second (metatrader saves order open time in seconds and keeps current time in seconds) This one solves it (it will alert on a first incoming tick) : _alerts_on_new_order_open_1.01.mq4

Now it works Ok

Thanks

To add comments, please log in or register