Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 805
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
Good afternoon!
I seem to have got it right now:
But when compiling, it gives one warning: possible loss of data due to type conversion on line:
index = GetPatt5barsDN(index);
There are no errors in the function header (or in the function itself) during compilation.
Greetings, I have a question, is there any way I can skip a certain pass during optimisation.
For example I'm optimizing my robot with 2 MA's - fast and slow starting from 10 and finishing with 1000 for each
How can i skip passes when period of slow one is less than period of fast one?
Greetings, I have a question, is there any way I can skip a certain pass during optimisation.
For example I'm optimizing my robot with 2 MA's - fast and slow starting from 10 and finishing with 1000 for each
How can I skip passes when period of slow one is less than period of fast one?
In this case, do return(INIT_PARAMETERS_INCORRECT) during initialization;
In this case, make return(INIT_PARAMETERS_INCORRECT) during initialisation;
thanks
Hello. Who can tell me. Three different TS, three different EAs, with three different magic numbers, on different pairs. But they have a common feature - order closing (using OrderClose() function) when certain conditions are reached(number of orders and small profit). In the tester, there are no problems, but in practice, the impression is that when Order Close() function triggers on one of the pairs, this function (OrderClose()) triggers also on other pairs, whether the conditions are met or not. What may be the reason for this? Maybe it is in the user-defined Close() function?
Below are the closing conditions and the custom Close() function.
Hello. Who can tell me. Three different TS, three different Expert Advisors, with three different magic numbers, on different pairs. But they have a common feature - order closing (using OrderClose() function) when certain conditions are reached(number of orders and small profit). In the tester, there are no problems, but in practice, the impression is that when Order Close() function triggers on one of the pairs, this function (OrderClose()) triggers also on other pairs, whether the conditions are met or not. What may be the reason for this? Maybe it is in the user-defined Close() function?
Here are the closing conditions and user-defined Close() function.
First, you use OrderSelect() to check orders as it should be - you control the symbol and the order master number, and then you close the order using OrderCloseX() and search through the orders again, but you don't control the symbol and master number in OrderSelect() for some reason
I think we should add OrderCloseX() to avoid rewriting the entire code:
First you check orders through OrderSelect() as it should be - control the symbol and the order master number, and then you close the order in OrderCloseX() and search through the orders again, but for some reason you do not control the symbol and the master number in OrderSelect()
I think I should add OrderCloseX() in order not to rewrite all code:
Thanks. I will correct it. Already corrected. Maybe this is the reason: the OrderCloseX() function is called on one of the pairs which then works on all other pairs and magic numbers. It may be, it may be. Thanks again.
Digits - Predefined Variables
I also decided to use this function, I read that if the number of digits in the office is 5 for example 1.00000 and the last values are zeros it might not return 5 digits but zero or for example the number will look like 1.24700 will return 3 decimal places even though there should be 5 of them is it true?
I also decided to use this function, I read that if the number of digits in a stable of 5 characters for example 1.00000 and the last value of zero it may not return 5 characters but zero, or for example the number will look like 1.24700 will return 3 decimal places even though there should be 5 of them is it true?
Digits are used with NormalizeDouble
https://docs.mql4.com/ru/convert/normalizedouble