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

 
Artyom Trishkin:
All have started. I have given advice for myself.

I wrote it, but it gives 2 errors:
SendMessageEmail' - function not defined.
SendMessageEmail' - function can be declared only in the global folder.

What should be corrected in this case, maybe you can help a green beginner.

double drawdown=10; //drawdown in %


if(AccountEquity()/AccountBalance()*100>=drawdown)
SendMessageEmail("Drawdown reached "+DoubleToStr(drawdown,2)+""+AccountCurrency());
bool SendMessageEmail(string text)
{
if(!IsTesting())
{
ResetLastError();
if(!SendMail(text,text))
{
Print(__FUNCTION__," ",GetLastError()); return(false);
}
}
return(true);
}

Thank you in advance.

 
Ruslan:

I wrote it but it gives me 2 errors:
'SendMessageEmail' - function not defined.
'SendMessageEmail' - function can be declared only in the global scope.

What should be corrected in this case, maybe you can help a green beginner.

...

Thank you in advance.

Insert the code correctly - I don't understand it at all.


 
Artyom Trishkin:

Insert the code correctly - it's not clear at all.


Thanks Artem, I've got it figured out.
 
Ruslan:
Thanks Artyom, already sorted it out.

You're welcome. And it's very good that you were able to do it yourself. It's true. Help is a double-edged sword.

 
Awww, forum members who can flip a fib, are there any? https://www.mql5.com/ru/forum/160683/page752#comment_10486102
Любые вопросы новичков по MQL4, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4, помощь и обсуждение по алгоритмам и кодам
  • 2019.02.01
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 
btc.mmd:
Awww, forum users, who can turn a fib, are there any? https://www.mql5.com/ru/forum/160683/page752#comment_10486102
 
Alexey Viktorov:

Pardon, thanks for the tip, corrected it, although there was an extra file attached...

 
btc.mmd:

Sorry, thanks for the tip, corrected it, although there was an extra file attached...

Now try drawing the fibka from bottom to top and top to bottom with your hands. Then the understanding will come.

 
Alexey Viktorov:

Now try drawing the fibka with your hands from bottom to top and top to bottom. Then the understanding will come.


There is a file attached, put it in the tester and you will understand everything...., I send the picture...





 
btc.mmd:


There is a file attached, put it in the tester and you will understand everything...., I am sending the picture...

Why do I need your file? I understand what you want. You can't understand that most graphical objects have start coordinates and end coordinates. It's like driving from point A to point B or from point B to point A. Where the distance travelled is 0 and where it is 100% do you even understand that?