Disliked{quote} to sort strings by integers or vice versa.......... step 1) define your arrays: string Sym[] = {"EURJPY","AUDCHF","XAGUSD","CADJPY","GBPAUD","NZDUSD","XAUUSD"}; int Num[] = {1,2,3,4,5,6,7}; step 2) create functions to return corresponding elements values........... int SymtoNum(string n){ for(int i=ArraySize(Sym)-1; i>=0; i--) if(n==Sym[i]) return(Num[i]);return(0);} string NumtoSym(int n){ for(int i=ArraySize(Num)-1; i>=0; i--) if(n==Num[i])return(Sym[i]);return("");}Ignored
- Post #65,443
- Quote
- Jan 12, 2024 12:37pm Jan 12, 2024 12:37pm
- | Joined Jun 2023 | Status: Junior Member | 1 Post
- Post #65,445
- Quote
- Edited 4:19pm Jan 12, 2024 1:54pm | Edited 4:19pm
- Joined Feb 2020 | Status: Member | 157 Posts
- Post #65,446
- Quote
- Jan 12, 2024 3:25pm Jan 12, 2024 3:25pm
- Joined Mar 2022 | Status: Member | 2,680 Posts
If you're looking for the Holy Grail indicator - STOP!
- Post #65,448
- Quote
- Jan 12, 2024 3:44pm Jan 12, 2024 3:44pm
- Joined Feb 2012 | Status: Member | 1,584 Posts
- Post #65,449
- Quote
- Jan 12, 2024 4:01pm Jan 12, 2024 4:01pm
- Joined Mar 2022 | Status: Member | 2,680 Posts
If you're looking for the Holy Grail indicator - STOP!
- Post #65,451
- Quote
- Jan 12, 2024 5:37pm Jan 12, 2024 5:37pm
- Joined Mar 2022 | Status: Member | 2,680 Posts
If you're looking for the Holy Grail indicator - STOP!
- Post #65,453
- Quote
- Jan 12, 2024 11:44pm Jan 12, 2024 11:44pm
- | Joined Nov 2022 | Status: Member | 21 Posts
- Post #65,454
- Quote
- Jan 13, 2024 12:55am Jan 13, 2024 12:55am
My English is not good, sometimes I say the wrong thing, please forgive me!
- Post #65,456
- Quote
- Jan 13, 2024 4:40am Jan 13, 2024 4:40am
My English is not good, sometimes I say the wrong thing, please forgive me!
- Post #65,459
- Quote
- Jan 13, 2024 7:00am Jan 13, 2024 7:00am
Desire is a set of possibilities And reluctance - a lot of reasons ....