Indicator Push alerts

Markfx

Trader
Aug 29, 2020
2
0
17
24
Hi guys
I've had a hard time trying to add push alerts that get sent to my android phone from an indicator. The indicator has native alerts enabled but I cant enable push alerts. I have very small knowledge of mlq5 coding. Please help. Attached is the source code.
 

Attachments

  • Candle-Size-Alert-MT5-Indicator.zip
    1.6 KB · Views: 20

Enivid

Administrator
Staff member
Nov 30, 2008
18,535
1,355
144
Odesa
www.earnforex.com
Replacing this:
MQL5:
         if(InpEnableAlert && i==0 && BufferHighSize[i]==EMPTY_VALUE)
            Alert(Symbol(),", ",NameTimeframe(),": Candle size>=",InpLevelSize," pips");
with this:
MQL5:
         if(InpEnableAlert && i==0 && BufferHighSize[i]==EMPTY_VALUE)
         {
            Alert(Symbol(),", ",NameTimeframe(),": Candle size>=",InpLevelSize," pips");
            SendNotification(Symbol()+", "+NameTimeframe()+": Candle size>="+InpLevelSize+" pips");
         }
should help.
 

Markfx

Trader
Aug 29, 2020
2
0
17
24
Hey Enivid
Thank you so much for your solution. It worked. Very, very grateful. I only knew I had to use the sendNotification function but not much else.