Hi coders, I have a list of 39 symbols in an array sym[39] :-
Now, I would like to get an auto-way or a loop to EXCLUDE all the metal pairs by filtering out with such condition :-
The final output of extracted non-metal nonMetSym[30] should be as follows :-
Please help to guide me the correct way, thanks
Inserted Code
string sym[39]={
"AUDCAD","AUDCHF","AUDJPY","AUDNZD","AUDSGD","AUDUSD","CADCHF","CADJPY","CHFJPY","EURAUD",
"EURCAD","EURCHF","EURGBP","EURJPY","EURNZD","EURUSD","GBPAUD","GBPCAD","GBPCHF","GBPJPY",
"GBPNZD","GBPUSD","NZDCAD","NZDCHF","NZDJPY","NZDUSD","USDCAD","USDCHF","USDJPY","XAGAUD",
"XAGEUR","XAGUSD","XAUAUD","XAUCHF","XAUEUR","XAUGBP","XAUJPY","XAUUSD","XTIUSD"};
// including 9 Metal Pairs Now, I would like to get an auto-way or a loop to EXCLUDE all the metal pairs by filtering out with such condition :-
Inserted Code
StringSubstr(sym[i],0,3)!="XAG" && StringSubstr(sym[i],0,3)!="XAU"
The final output of extracted non-metal nonMetSym[30] should be as follows :-
Inserted Code
string nonMetSym[30]={
"AUDCAD","AUDCHF","AUDJPY","AUDNZD","AUDSGD","AUDUSD","CADCHF","CADJPY","CHFJPY","EURAUD",
"EURCAD","EURCHF","EURGBP","EURJPY","EURNZD","EURUSD","GBPAUD","GBPCAD","GBPCHF","GBPJPY",
"GBPNZD","GBPUSD","NZDCAD","NZDCHF","NZDJPY","NZDUSD","USDCAD","USDCHF","USDJPY","XTIUSD"};
// Non-Metal Pairs Please help to guide me the correct way, thanks