Download MetaTrader 5
To add comments, please log in or register
All Code Base apps are available from MetaTrader 5. You can publish your own one!
flwilliams87
207
flwilliams87 2015.06.17 20:45 
Is there a way for me to compare every element of an array with a static value via an IF statement? I don't think ArrayCompare works for this.  Thanks
Marco vd Heijden
Moderator
4180
Marco vd Heijden 2015.06.17 21:28  

in a for loop with the if statement == is equal to.

  
   for(int i=0;i<total_elements;i++)
    {
     if(array_here[i]==value_here)
      {
       //Do something.
      }
    }
flwilliams87
207
flwilliams87 2015.06.17 22:16  
Marco vd Heijden:

in a for loop with the if statement == is equal to.

Very good sir! Thank you!
/
To add comments, please log in or register