Arpit T:
My array var[] has values like 2,4,6,7,2
I want to check if from index 0 to index 4
if 2>4 or if 4>6 or if 6<7 or if 7>2
how can i do that?
- Your array as only one value at index 500. Go through the object list and find all your “Lowxxx” and store in increasing indexes. Not the same place.
- Once you sort the array, you've lost what index the value came from.
- “How can you do that?” Maybe think before posting: if( var[2] > var[4] ) or if( var[4] > var[6] ).
Arpit T:
My array var[] has values like 2,4,6,7,2
I want to check if from index 0 to index 4
if 2>4 or if 4>6 or if 6<7 or if 7>2
how can i do that?
So how do you do that? let see
int total = ArraySize(var); for(int i=0;i<total-1;i++) { if (var[i] > var[i+1]) Print("I am greater"); else Print("I am lesser"); }
That should work.
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
My array var[] has values like 2,4,6,7,2
I want to check if from index 0 to index 4
if 2>4 or if 4>6 or if 6<7 or if 7>2
how can i do that?