compare code 8+i vs 9

 
 
&& iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 8+i) > iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9+i) //Envelopes < Envelopes

&& iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9) > iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9+i) //Envelopes < Envelopes

please help me comparison

 

Please don't post randomly in any section. Your question is not related to the section you posted.

MT4/mql4 has it's own section on the forum.

This topic has been moved. Please don't create another duplicate topic.

 

I have edited your post, but in the future, please use the CODE button when you insert code.

Code button in editor

 
manhha: please help me comparison

Please explain your question in more detail.

If you don't explain your objective and what it is that is wrong (or correct) with your code sample, we will not be able to give you any advice or answer.

 
  1. manhha: please help me comparison

    State your problem clearly.

  2. Post in the correct section.

  3. && iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 8+i) > iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9+i) //Envelopes < Envelopes
    
    && iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9) > iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9+i) //Envelopes < Envelopes

    Are your books one column but two feet wide? No because that is unreadable. They are six (6) inches, sometimes two columns, so you can read it easily. So should be your code.

  4. Don't copy and paste code, write self documenting code. Using variables makes it readable. Now you can see the difference between your two comparisons.

    double e_i8     = iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 8+i);
    double e_i9     = iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9+i);
    double e_9      = iEnvelopes(NULL, PERIOD_CURRENT, 27, MODE_SMMA, 0, PRICE_CLOSE, 0.5, MODE_UPPER, 9)
    
    && e_i8 > e_i9 //Envelopes < Envelopes
    
    && e_9  > e_i9 //Envelopes < Envelopes
Reason: