[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 640
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
Applied in an indicator or EA? Although SetIndexBuffer seems to be applied only in indicators...
The array in your mentioned function doesn't have to be a buffer, BUT, when using a "non-buffer" array, don't forget to initialize it (specify its dimensionality - ArrayResize(array, n)) or directly when declaring it - double array[n].
This is what I usually do.
ArrayResize(array, Bars); ArrayInitialize(array, 0);
Bars - when you do not know what size the array will be. May it be an error here?
This is what I usually do.
ArrayResize(array, Bars); ArrayInitialize(array, 0);
Not a good habit. This is what MT does, if you do everything correctly in the indicator
Not a good habit. MT does this if you get it right in the indicator
What's the right way to do it? If I declare and initialise the array myself. It's just that sometimes I don't want to load buffers or there aren't enough of them.
By the way, additional question) What to do if there are not enough buffers?
What's the right way to do it? If I declare and initialise the array myself. It's just that sometimes I don't want to load buffers or there aren't enough of them.
By the way additional question) What to do if there are not enough buffers?
I've only had one case where the internal (indicator) buffers were not enough. I made an auxiliary indicator. However, after optimizing the calculations the need for it, as well as the indicator itself, disappeared. This was the first variant of Hal's indicator that I made
What's the right way to do it? If I declare and initialise the array myself. It's just that sometimes I don't want to load buffers or there aren't enough of them.
By the way additional question) What to do if there are not enough buffers?
Something like this: If not enough
Why do you think so, or did someone tell you this nonsense?
You can always solve it if you have to.
Of course you do, that's why I'm here.
Send the whole code in your email, maybe you'll get something.
Is there any way to indicate the spread of values?
Example
You must mean a construction like this?
If you need to analyse open orders, the code will be more complicated there