iEnvelopes does not accept negative shift

 

How do I get iEnvelopes to use a negative shift?

   int maPeriod = 24;
   double deviation = 0.15;
   int shift = 10;  // this works
   int shift = -10; // this does not work
   
   double envHigh = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, shift, PRICE_MEDIAN, deviation, MODE_UPPER, 0);
   double envLow  = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, shift, PRICE_MEDIAN, deviation, MODE_LOWER, 0);

 Negative shift works here...

 

 
double envHigh = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, 10, PRICE_MEDIAN, deviation, MODE_UPPER, -10)
 
qjol:


double envHigh = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, 10, PRICE_MEDIAN, deviation, MODE_UPPER, -10)
same result as...
double envHigh = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, 0, PRICE_MEDIAN, deviation, MODE_UPPER, 0)
and double envHigh = iEnvelopes(NULL, 0, maPeriod, MODE_SMA, 0, PRICE_MEDIAN, deviation, MODE_UPPER, -10) returns 0.00000000
 
MisterDog:

How do I get iEnvelopes to use a negative shift?

 Negative shift works here...

It can't work . . .  plot it manually on a chart show a screenshot and tell us what the values are for bar 0 . . .  and then tell us what the values are for bar 11.
Reason: