SendNotification only takes one string argument. Therefore
SendNotification(Symbol()+", "+NameTimeframe()+": Candle size>="+string(InpLevelSize)+" pips");
(the other two functions already return string, only InpLevelSize needs to be converted)
![Documentation on MQL5: Network Functions / SendNotification Documentation on MQL5: Network Functions / SendNotification](https://c.mql5.com/36/52/documentation-on-mql5-network-functions.png)
Documentation on MQL5: Network Functions / SendNotification
- www.mql5.com
SendNotification - Network Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Haruto Rat #:
SendNotification only takes one string argument. Therefore
SendNotification(Symbol()+", "+NameTimeframe()+": Candle size>="+string(InpLevelSize)+" pips");
(the other two functions already return string, only InpLevelSize needs to be converted)
Thats great,
thanks a lot for your help
string NameTimeframe(void) { switch(Period()) { case 1 : return "M1"; case 2 : return "M2"; case 3 : return "M3"; case 4 : return "M4";
- Don't hard code constants. Always use the corresponding symbol (PERIOD_M…).
- Simplify, use EnumToString
Need some help with some MT5 code - MT5 - Expert Advisors and Automated Trading - MQL5 programming forum #3 (2018)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I am trying to add a mobile alert to the below indicator and have added the following line
SendNotification(Symbol(),", ",NameTimeframe(),": Candle size>=",InpLevelSize," pips");
but now I get a 'wrong parameters count' error when I compile it.
If anyone could point me in the right direction on fixing this that would be awesome.
Many thanks