Ichimoku from MT4 to MT5 (help needed: SenkouspanA[-26 ] ??)

 

Hello

 I like the Ichimoku indicator.  Now I dont understand how to use the Future Cloud, it is the senkou span A (-26) and senkou span B (-26)... as you know, different to other indicators the Ichimoku is shifted 26 periods ahead of the current price.

In old metatrade 4 it was like:

iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, -26)

//Here the (-26) indicates that I am using the cloud ahead

 

Now in MT5 a possible code would be:

#include <GetIndicatorBuffers.mqh>
//---- arrays for indicators
double   Tenkansen[];   // array for TENKANSEN_LINE of iIchimoku
double   Kijunsen[];    // array for KIJUNSEN_LINE of iIchimoku
double   SenkouspanA[]; // array for SENKOUSPANA_LINE of iIchimoku
double   SenkouspanB[]; // array for SENKOUSPANB_LINE of iIchimoku
double   Chinkouspan[]; // array for CHINKOUSPAN_LINE of iIchimoku
//---- handles for indicators
int      Ichimoku_handle;            // handle of the indicator iIchimoku
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- creation of the indicator iIchimoku
   Ichimoku_handle=iIchimoku(NULL,0,9,26,52);
//--- report if there was an error in object creation
   if(Ichimoku_handle<0)
     {
      Print("The creation of iIchimoku has failed: Runtime error =",GetLastError());
      //--- forced program terminatio
      return(-1);
     }
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//--- set indexation of arrays as timeseries
//--- filling the arrays with current values of all indicator's buffers
//--- return if there was an error
   if(!GetIchimokuBuffers(Ichimoku_handle,0,100,
      Tenkansen,
      Kijunsen,
      SenkouspanA,
      SenkouspanB,
      Chinkouspan,
      true)) return;
  }

 But I am not sure if SenkouspanA[-26 ] will work, or yes??

 Thanks in advance for any help.