iMACD

 

Hi everyone;

double  iMACD(
   string       symbol,           // symbol
   int          timeframe,        // timeframe
   int          fast_ema_period,  // Fast EMA period
   int          slow_ema_period,  // Slow EMA period
   int          signal_period,    // Signal line period
   int          applied_price,    // applied price
   int          mode,             // line index
   int          shift             // shift
   );


How could I access the value of shift e.g

Print("This is the value of shift: ", iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);

Many Thanks


 
Print("This is the value of shift: ", iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);

Question makes no sense. You are the one specifying the shift as one.

Use SRC for code.

 
WHRoeder:

Question makes no sense. You are the one specifying the shift as one.

Use SRC for code.

how could I access the value of shift which is not the same as 1.

the value 1 in the following the Print("This is the value of shift: ", iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1); is not 1. it means the pervious bar value.

 
The value of the shift is one. The value of the macd for bar 1 ("the previous bar") is iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1).
 
WHRoeder:
The value of the shift is one. The value of the macd for bar 1 ("the previous bar") is iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1).
thanks