sinput string InpSuffix = ""; // Currency Symbol Suffix string Pairs[] = { "EURAUD","EURCAD","EURCHF","..." }; int OnInit() { if(StringLen(InpSuffix)) { for(int i=0; i<ArraySize(Pairs); i++) Pairs[i] += "." + InpSuffix; }
lippmaje:
Code will not work for EAs. If user changes symbol or timeframe, EA goes through a deinit-init cycle. It is not reloaded. The array ends up “EURAUD.x.x.x.x.x”
Yep. Fix to this:
sinput string InpSuffix = ""; // Currency Symbol Suffix string Pairs[]; int OnInit() { string pairs[] = { "EURAUD","EURCAD","EURCHF","..." }; if(StringLen(InpSuffix)) { for(int i=0; i<ArraySize(pairs); i++) pairs[i] += "." + InpSuffix; } ArrayCopy(Pairs,pairs);
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 try to set suffix value to currency string
I have this code
try to replace this value to this array
as follow
as you know constant value cannot set in array .
So how can set this value to get result
I want to add suffix string from dialog box when run this code