Right now the size of the array is zero, if you want to make it dynamic each time you need to add anything to it or new candle arrives(like indicators) just resize it like this:
ArrayResize(var_1,ArraySize(var_1)+1);
No, only buffers auto-resize. Resize them yourself.
William Roeder #:
No, only buffers auto-resize. Resize them yourself.
No, only buffers auto-resize. Resize them yourself.
Khuman Bakhramirad #:
Right now the size of the array is zero, if you want to make it dynamic each time you need to add anything to it or new candle arrives(like indicators) just resize it like this:
Thanks, just making sure I wasn't missing anything since resizing makes my code somewhat less intuitive (and maybe my lazy side was hoping as well haha)
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 know when you are creating a custom indicator, you can create a truly dynamic array to operate as a buffer where you are don't ever have to state its size.
I was wondering if the same this is possible when creating EAs, currently I get the obvious out of range error with the code below.
Example code:
Thanks in advanced