Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1007
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
Time minus time divided by PeriodSeconds()
so it could be the wrong length at the Friday-Monday transition (or if there are missed bars in the history)
it is better to read point time and then define bars
so it could be the wrong length at the Friday-Monday transition (or if there are missed bars in the history)
it is better to read the time of the points and then identify the bars
Agreed. Didn't bother myself or my brain. Then it is better to take the number of bars between dates.
if(tot > 1)PercCloseDown();
This part says error
Can you tell me how to start the robot?
This part writes an error
How do I get the robot to start?Here the variable is declared and immediately it is divided:
The error shows that the compiler treats this variable (spred) as undeclared. This is also at least not good, because it (variable) is not initialized - since it is nota global variable, it may have an undefined value...
Try declaring it earlier and assigning a value to itHere a variable is declared and immediately it is shared:
The error shows that the compiler treats this variable (spred) as undeclared. This is also at least not good, because it (the variable) is not initialized - since it is not a global variable, there may be an undefined value...
Try to declare it earlier and assign a value to itEugene, from the bottom of my heart!
It's on, thank you.
What to do if in MQL5 ...
... it's been about a minute and the problem is the same. Why so long?
Error 4806 - Requested data not found ... - ...how do I make my EA find it?
if(tot > 1)PercCloseDown();
This part says error
Can you tell me how to start the robot?
How do I catch the out of memory error?
What could be causing this message in the first place?
I've written a program of about 20 thousand lines. I have a lot of different classes, arrays and structures.
Approximately once every two or three days the "out of memory" message pops up.
I don't know how to track down which function is responsible for memory leak.
How do I catch the out of memory error?
What could be causing this message in the first place?
I've written a program of about 20 thousand lines. I have a lot of different classes, arrays and structures.
Approximately once every two or three days the "out of memory" message pops up.
I don't know how to catch it, which function is responsible for memory leak.
Make sure each new has its own delete
That is, only through careful reading of your code. To make reading easier and more fun, you can comment it out :-)
It is also a good idea to write test-case scripts for each class and check leaks inside classes that way.
make sure that each new has its own delete
That is, just by reading the code carefully. To make reading easier and more fun, you can also comment :-)
It's also a good idea to write test-case scripts for each class and check leaks inside classes that way.
New, delete are not used. The class elements are defined at the beginning and I don't recreate them.
Mostly I work with arrays.
What aretest-case scripts ?