Please use the search engine before posting.
Sidnei Vladisauskis:
Hi everyone,
In an EA using Protrader I have a Dictionary type, that I can store key | value where value can be any type, inclusive arrays.
So, I can do something like this:
How can I do something like that using mql5? I tried using HashMap but unsuccessful.
Thanks
#include <generic/hashmap.mqh> #include <generic/arraylist.mqh> void OnStart() { CHashMap<string, CArrayList<bool>*> dict; bool flags[] = {false, false, true, true}; CArrayList<bool> array_flags(flags); dict.Add("flags", &array_flags); CArrayList<bool> *temp; if(dict.TryGetValue("flags", temp)) { for(int i=0; i<temp.Count(); i++) { bool flag; if(temp.TryGetValue(i, flag)) { Print(flag); } } } }
nicholi shen:
thanks

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
Hi everyone,
In an EA using Protrader I have a Dictionary type, that I can store key | value where value can be any type, inclusive arrays.
So, I can do something like this:
How can I do something like that using mql5? I tried using HashMap but unsuccessful.
Thanks