How come I can't use this then and just replace the Alert function with SendNotification then?
if (SoundON) Alert("SELL signal at Ask=",Ask,"\n Bid=",Bid,"\n Date=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime()),"\n Symbol=",Symbol()," Period=",Period());
How come I can't use this then and just replace the Alert function with SendNotification then?
Please read the documentation for Alert() and then for SendNotification() . . . Alert() takes many parameters, SendNotification() takes one. either combine the values/strings using + or use StringConcatenate()
RaptorUK:
Please read the documentation for Alert() and then for SendNotification() . . . Alert() takes many parameters, SendNotification() takes one. either combine the values/strings using + or use StringConcatenate()
//How do I then parse this last part to get only the hour of current time?string AlertText = "Currency pair: " + SendNotification(Symbol() + " , " + "Timeframe: " + TimeToStr(TimeLocal())
//And how do I then after that add xx hours?//Lets say the local time is 15:26 - I then need to fetch current hour(15) and then add one hour// Can someone hwlp me with that?
AlertPrefix2=StringConcatenate("BUY signal alert","BUY signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
AlertPrefix3=StringConcatenate("SELL signal alert","SELL signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
is it so hard ?
How come I can't use this then and just replace the Alert function with SendNotification then?
How come I can't use this then and just replace the Alert function with SendNotification then?
Please read the documentation for Alert() and then for SendNotification() . . . Alert() takes many parameters, SendNotification() takes one. either combine the values/strings using + or use StringConcatenate()
Awesome that worked. Thanks a lot.
As I already said via PM . . .
Do you need 15 and then add an hour to get 16 ? or do you need 15:00 as a datetime and then add 1 hour to get 16:00 as a datetime ?
As I already said via PM . . .
OK, you want 16:00 as a datetime . . .