Could you please advise how to do the MQL4 code alignment in Windows 7?
Or who has already mastered it? Thank you.
there is no built-in "beautyfinder" in the meta-editor, unlike other more advanced IDEs, and probably won't be
you can "align" (or do it periodically as needed) in any development environment you like (MQ4 is just a standard tessct)
Some people don't use meta-editor at all, and attach the MQL to EX4 compilation script to Notepad+, Hexedit or something else (MQL-coloring scripts for them are available, too)
OlegTs: Thanks, if no one else responds, I will have to remember my youth))))
If accuracy is not too important, you can simply use the rectangular method, i.e. just sum up the original series and get an approximate value of the integral.
alsu: If accuracy is not very important, you can simply use the rectangular method, i.e. by bluntly summing up the original series, you will get an approximate value of the integral.
If it's not too much of a problem, you can just use the rectangular method, i.e.
OlegTs: but more details, if you don't mind, on some five, six bars...
If there is a series x(k), then the integral of x(k) from a to b is approximately x(a) + x(a+1) + .... + x(b-1) + x(b). It is called the rectangular formula.
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.
Guys, please help!
There is a variable counter. I need different actions to be performed on even and odd numbers.
I see it like this
if ((KO/2) > MathFloor(KO/2)) {body1 in which the counter change KO=KO+1;}
if ((KO/2) == MathFloor(KO/2)) {body2 in which the counter change KO=KO+1;}
but body1 is always executed.
The parity is determined by checking the remainder after division:
Guys, please help!
There is a variable counter. I need different actions to be performed on even and odd numbers.
I see it like this
if ((KO/2) > MathFloor(KO/2)) {body1 in which the counter change KO=KO+1;}
if ((KO/2) == MathFloor(KO/2)) { body2 in which the counter change KO=KO+1;}
but body1 is executed all the time.
if (MathAbs(MathMod(KO,2) == 0)) {body1 in which the KO counter change is even}
else {body1 in which the KO counter change is odd}
if KO always >=0, then MathAbs() is not required
Please advise how to align code in MQL4 under Windows 7.
Or how can someone level it?
Thank you.
Good day to all!
Could you please advise how to do the MQL4 code alignment in Windows 7?
Or who has already mastered it?
Thank you.
there is no built-in "beautyfinder" in the meta-editor, unlike other more advanced IDEs, and probably won't be
you can "align" (or do it periodically as needed) in any development environment you like (MQ4 is just a standard tessct)
Some people don't use meta-editor at all, and attach the MQL to EX4 compilation script to Notepad+, Hexedit or something else (MQL-coloring scripts for them are available, too)
A textbook on numerical methods for solving mathematical problems will help you))
e.g. http://www. uchites.ru/files/nummethod_book_chapter3-45.pdf (chapter 3.5. Numerical integration of functions)
although... maybe someone has already done this for themselves
Thanks, if no one else responds, I will have to remember my youth))))
If accuracy is not very important, you can simply use the rectangular method, i.e. by bluntly summing up the original series, you will get an approximate value of the integral.
but more details, if you don't mind, on some five, six bars...
and more details, if you don't mind, on some five, six bars...