Hi, I am optimizing an EA and some of its variables are loaded from a file. What is the best way to store them in memory before each pass so all functions can have access? Thanks
- [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4.
- is there a way to load a file into the memory during optimization and each
- MQL4 Learning
Read them in, in OnInit.
Plamen Zhivkov Kozhuharov: Hi, I am optimizing an EA and some of its variables are loaded from a file. What is the best way to store them in memory before each pass so all functions can have access? Thanks
I am not sure of this, but I believe that Global Terminal Variables are cached in memory. Maybe you can use those in your EA optimisations.
Since the names of Global Terminal Variables can be made to be quite complex, you can use the names to do some simple indexing of values, doing something similar to rudimentary arrays or structures via the names.
EDIT: I'm assuming here that you are wanting to have this data the same and cached on all the passes and not different on each pass. If you want to have it different on each pass, then William's suggestion in the previous post is the better option.
Thank you both!
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