iEnvelopes ( Upper and lower )

 

Hello ,

In MT4 I used to call the iEnvelopes and define the upper or lower side of the envelope

double env1H = iEnvelopes(NULL, 0, ma_period1,ma_method, 0, PRICE_CLOSE, DV1, MODE_UPPER, 0);

double env1L= iEnvelopes(NULL, 0, ma_period1,ma_method, 0, PRICE_CLOSE,  DV1, MODE_LOWER, 0);  


However in MT5 the last two parameters for the ( MODE_UPPER, 0) for the current candle and the mode have disappeared so how am i suppose to use the same function in MT5 ?

For example I want to go short when the price is above the env1H and long when the price is below env1L , that was easy with MT4 and I am not sure how to do it in MT5

any help is highly appropriated


Regards
Fadi