Questions from Beginners MQL5 MT5 MetaTrader 5 - page 114
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
I find it hard to answer. I re-read your messages but didn't get the idea of changing the array's size. Your answer to the code also depends on understanding the concept. Maybe somebody else will answer.
I don't really care about changing the size of the array, I'll give it 20, for example.
Here you have an array of 20 elements. Let's assume that the if condition holds - we assign a price value to the first element of the array: masCenPoc[0] = cena_poc;
What will we assign to the second element of the array?
Here you have an array of 20 elements. Let's assume that the if condition holds - we assign a price value to the first element of the array: masCenPoc[0] = cena_poc;
What should we assign to the second element of the array?
I don't really care about changing the size of the array, I'll give it 20, for example.
It has to make sense. In this case, an array may not be necessary. In one loop with further calculations, maybe 1 variable is enough. I think you want to get history data, therefore it would be more logical to loop from some bar to 0. And then your data will be built. If you need an array, it should accumulate as a stack in your case.
If you want to build by online quotes, then it is still according to stack rules.
http://algorus.blogspot.ru/2012/12/blog-post_7.html
https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D0%B5%D0%BA
Hello. When I try to copy indicator data to an array using the CopyBuffer function I get values like -6.99999999999999999e-005
What can be the reason?
Hello. When I try to copy indicator data to an array using the CopyBuffer function I get values like -6.99999999999999999e-005
What can be the reason?
The indicator has different data in the data window. I attach the EA to the H1 chart and it copies the data from the M5 M15 and H1 timeframes.