asham:
Use ArrayResize()
I am wondering if it is possible to have a variable be one of the parameters to be the size of an array I am using? I am using the array to hold values of indicators for different periods of time, and want to use an external variable to change the array size in the strategy tester and not the code itself. Is this correct or do I have to do something else to get this to work?
RaptorUK:
Use ArrayResize()
Use ArrayResize()
Thank you Raptor, I was originally thinking that ArrayResize() was only for changing the size of the array in the middle of the execution (need a few more elements to get the proper calculation). It worked perfectly for my purposes.

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 am wondering if it is possible to have a variable be one of the parameters to be the size of an array I am using? I am using the array to hold values of indicators for different periods of time, and want to use an external variable to change the array size in the strategy tester and not the code itself. Is this correct or do I have to do something else to get this to work?