Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1427
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
So I didn't write anything else, I just repeated your code.
Visually arranged the numbers incorrectly, and you thought that's what you needed.
Most likely, you need to assign 0.5555 to the loop instead of ArrayFill. Give it a try.
Thank you. I hope to learn new information quickly.
You're welcome, as long as it works :)
Once again thank you very much for your informational support.
maybe a loop instead of ArrayFill() will slow down the program
All code consumes resources. ArrayFill or loop-fill costs about the same.
But sorting, or completely rewriting the array costs time. Therefore, it is better to find other solutions, for example, to think about data storage and preparation, to do pre-calculations and other options.
All code consumes resources. ArrayFill or loop-fill costs about the same.
But sorting, or completely rewriting the array costs time. That's why it's better to find other solutions, e.g. data preparation, preliminary calculations and other options.
Got it. Thank you.
Got it. Thank you.
Sorry to interrupt, maybe sorting isn't necessary? Maybe only the maximum (minimum) value should be determined?
The documentation for one of the languages is very good and detailed, time-consuming of course, but it helps programmers
---
Less costly would be to fill in correctly at the beginning and if possible try not to dabble with an array in five knees: fill, sort, add, sort and add again.
Avoid unnecessary actions if possible.
---
In mql there is a function: StringConcatenate, it is super expensive, but it is used because of its presence in the language, although it can be easily avoided and write "light" codes.
Sorry to interrupt, maybe sorting is not necessary? Maybe only determine the maximum (minimum) value?
Thanks for your input. It's sorting that's needed.... At least at this stage of my understanding of my design. Perhaps later I will have a rethink and look for some sorting alternatives. Regarding the minimum and maximum I already know that there are functions that determine them and that it's less expensive.
The documentation for one of the languages is very good and detailed, time-consuming of course, but it helps programmers
---
Less costly would be to fill in correctly at the beginning and if possible try not to dabble with an array in five knees: fill, sort, add, sort and add again.
Avoid unnecessary actions if possible.
---
There is a function in mql: StringConcatenate, it is super expensive, but it is used because of its presence in the language, although it can be easily avoided and write "light" codes.
The general idea is understood... as it seems to me. Thanks for the tip. If you don't mind telling me what dollar sign means before array name $ array[] and before value $var It seems to me that it's not from mql at all.