//--------------------------------------------------------------------// fibonacci.mq4// Предназначен для использования в качестве примера в учебнике MQL4.//--------------------------------------------------------------------intstart()// Спец. ф-ия start(){//--------------------------------------------------------------------inti; // Формальн параметр,счётчикdoubleA,B,C, // Числа последовательностиDelta, // Фактич. разница между КфD; // Заданная точность//--------------------------------------------------------------------A=1; // Начальное значениеB=1; // Начальное значение C=2; // Начальное значениеD=0.0000000001; // Задаём точностьDelta=1000.0; // Начальное значение//--------------------------------------------------------------------while(Delta > D)// Заголовок оператора цикла{// Скобка начала тела циклаi++; // СчётчикA=B; // Следующее значениеB=C; // Следующее значениеC=A + B; // Следующее значениеDelta=MathAbs(C/B - B/A); // Искомая разница между Кф}// Скобка конца тела цикла//--------------------------------------------------------------------Alert("C=",C," Число Фибоначчи=",C/B," i=",i);//Сообщение на экранreturn; // Выход из start()}//--------------------------------------------------------------------
If possible, please give some practical example of how to apply this operator to trade...... i.e. for example a brief condition and that it could be checked on a chart.
Everything works. Thanks again. If it's not too much trouble, take a look at this inductor https://www.mql5.com/ru/code/9139. Is it possible to attach a beep when it crosses the zero line?
For the needs of an Expert Advisor (not an indicator) it is necessary to go through all or part of the history. How do I know how many bars are in the history? (The Bars operator shows how many bars are on the chart. )
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.
MQL Tutorial - Operators - The while loop operator
This is an example from the textbook:
If possible, please give some practical example of how to apply this operator to trade...... i.e. for example a brief condition and that it could be checked on a chart.
Thank you in advance
Good day to all. Please help me to convert zip file to mq4 indicator https://www.mql5.com/ru/code/9136.
Good day to all. Please help me to convert the zip file to mq4 indicator https://www.mql5.com/ru/code/9136.
You mean open the archive?
Yes. I don't have this function supported by my beech...
Yes. I don't have this function supported by my beech...
Is this the second file that zipped? The one with the alert?
Is that the second file that zipped? The one with the alert?
This file is in the archive.
Thank you very much. I'll give it a try...
Everything works. Thanks again. If it's not too much trouble, take a look at this inductor https://www.mql5.com/ru/code/9139. Is it possible to attach a beep when it crosses the zero line?