
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
Completely flummoxed now. I hope someone can help.
I'll put the code and test results below, but in a nutshell, I've got 2 arrays declared exactly the same way:
At the top of OnInit, before doing anything with them, both show to be dynamic arrays:
(Don't know why so fuzzy, it clears up if you click on the image.)
Then I set both as indicator buffers in exactly the same way:
... with the result that the SetIndexBuffer for DMABuffer fails, and so it remains dynamic. I have problems with it further down in the code, but I'm guessing they all start here.
What the heck?
Ideas?
Here's the whole thing:
After the initial pass (prev_calculated == 0), the CopyBuffer statements use a to_copy of 1:
to_copy=rates_total-prev_calculated; //--- last value is always copied to_copy++;
which works just find for MABuffer, but leaves DMA_Buffer with an ArraySize of 1. So, of course, I get an index out of range error in the for() loop:
Here's the test run Print output from the Experts tab:
(scroll to the right to see line numbers and data values)
Thanks for your help. I'll be really glad once I've wrapped my mind around this sucker.