Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1959

Keith Watford  
Muhalafta #:
hello, I have a problem, a few days ago my master opened an order for 2 layers CADJPY, 

What are layers?

Stan Bland  

Does any one know of an EMA histogram indicator like I have in the picture? One that I can adjust the EMA's to my prefered numbers?

The picture is CCI, but I am wanting EMA looking exactly like the CCI's are showing.

I am not a coder, so I have very little knowledge on how to make it hte way I am wanting.


As you can tell, I would like to have one color for price going up, another for price going down, and the third color on a stalling of price.

Thank you.

Files:
Capture6.PNG  27 kb
Mykhailo Turovskyi  
Hello friends, please help me set up an email alert. Gives an error, I don't know why. I'm sending screenshots. Thank you.
Fernando Carreiro  
@Mykhailo Turovskyi #: Hello friends, please help me set up an email alert. Gives an error, I don't know why. I'm sending screenshots. Thank you.

Please search for other related posts besides the ones below.

Forum on trading, automated trading systems and testing trading strategies

Looking for Working SMTP server for e-mail sending

Robert Gerald Wood, 2022.06.07 14:11

Hi,

I use GMail to send emails, you just have to setup an App Password for Gmail. 

https://support.google.com/mail/answer/185833?hl=en-GB

Once you have your app password, you setup the email in metatrader as usual, just using the app password instead of your gmail account password.


Hope it helps.

Forum on trading, automated trading systems and testing trading strategies

SMTP connection fails

Eleni Anna Branou, 2022.08.18 17:15

Email notifications work fine, check your email MT4/5 settings.


You go to MT4/5 >> Tools >> Options >> Email tab and you fill in the necessary details for your email and server, in order to receive your email notifications. Below is an example of the details that are required and a list of the most popular email providers and their SMTP settings.

  • In the SMTP server field you need to put your email provider’s SMTP address, you can see most of the popular providers below.

  • In the SMTP password field, you need to put your email’s password.

  • In the From and To fields, you need to put your full name a comma and then your email again, for example: John Smith, johnsmith@gmail.com


List of SMTP Mail Servers: https://domar.com/pages/smtp_pop3_server


Gmail: smtp.gmail.com:465

Outlook-Hotmail: smtp-mail.outlook.com:587

Yahoo: smtp.mail.yahoo.com:465

iCloud: smtp.mail.me.com:587

Mail.com: smtp.mail.com:465

Mail.ru: smtp.mail.ru:25

Zoho: smtp.zoho.com:465

Gmx.com: smtp.gmx.com:465



amin parvini  
I am trying to code my system however after compiling it returns the "not all control paths return a value"
----------------------------------
string buyorder()
{
if((iMA(Symbol(),PERIOD_CURRENT,200,0,MODE_SMA,PRICE_MEDIAN,1)-(10*Point))<=iLow(Symbol(),0,1)&&
(iMA(Symbol(),PERIOD_CURRENT,200,0,MODE_SMA,PRICE_MEDIAN,1)+(10*Point))>=iLow(Symbol(),0,1)&&
(((iMA(Symbol(),PERIOD_CURRENT,200,0,MODE_SMA,PRICE_MEDIAN,2)-(10*Point))<=iLow(Symbol(),0,2)&&
(iMA(Symbol(),PERIOD_CURRENT,200,0,MODE_SMA,PRICE_MEDIAN,2)+(10*Point))>=iLow(Symbol(),0,2))
||iLow(Symbol(),0,2)>=iMA(Symbol(),PERIOD_CURRENT,200,0,MODE_SMA,PRICE_MEDIAN,2)))

return("Please_Buy");

}
Files:
Untitled.jpg  479 kb
William Roeder  
amin parvini #: "not all control paths return a value"
  1. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
              Forum rules and recommendations - General - MQL5 programming forum (2023)
              Messages Editor

  2. string buyorder(){  <<<<<<<< function returns a string.
       if(condition) statement;
     <<<<<<<<<<<<<<<<<<<<<<<<<<< what are you returning here?
    } <<<<<<<<<<<<<<<<<<<<<<<<<< end of function.