![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
That's what I'm trying to understand - what's the point in increasing the array on demand, if you can immediately set the maximum required in the current situation...
You seem to be an accountant, I'll try to rephrase it in your language.
You're an accountant? What makes you think you can get into another professional field and explain something there?
We are talking about programming here in the thread, so try to come up with your own example in the form of code - it will be more productive.
That's what I'm trying to understand - what's the point in increasing the array on demand, if you can immediately set the maximum required in the current situation...
And what if you don't know what size array is required?
Example:
You fill the array with zeros and search the filled part until you encounter 0. But if the array is enlarged as needed, the loop will be terminated when the last element of the array is reached. Everything is clear...
And if you don't know what size array you need?
Then there's really no other way. I just haven't come across it.
In general, I see the sense when it is an EA code and using a large array is a rare event, then if you use a dozen EAs at once, you have a chance to execute the code with less memory than it would be required when allocating the maximum memory. And to the same topic - before creating a large array, wait in the code until the required amount of memory is freed. In general, the script is specific and it is more suitable for advisors or for those who make heavy calculations with scripts, running several of them at once on different charts.
Then there's really no other way. I just haven't come across it.
In general, I see the sense when it is an EA code and using a large array is a rare event, then if a dozen EAs are used at once, there is a chance to execute the code with less memory than it would be required when allocating maximum memory. And to the same topic - before creating a large array, wait in the code until the required amount of memory is freed. In general, the script is specific and it is more suitable for advisors or for those who make heavy calculations with scripts, running several of them at once on different charts.
Forum on trading, automated trading systems and testing trading strategies
What to do when spreads widen like this?
fxsaber, 2024.06.25 22:17
Be careful, you can get caught in cross-platform code.
Trade server builds later than 12.06.2024 (e.g. b4410) fill the second byte of MqlTick.flags ticks(SymbolInfoTick and CopyTicks*).
Today I suddenly found out that ME has such a clipboard.
Copying as usual by Ctrl+c and pasting by Alt+v and selecting the necessary....
I don't know how many things can be stored there. I thought it was 10, but I typed 11 and stopped.
In MM calculations, consider this possibility.