Dynamic Arrays in Expert Advisor
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.
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)
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