Fibo Pivots buffer values

 

I'm attempting call the "Fibo Pivots" Indicator by mladen. I've successfully called the indicator and gotten it to print on my charts. However, in my advisor I'm trying to store the values of the Weekly Pivots. I'm not able to figure out what the different buffers are for the different Pivot levels so I can copy them using CopyBuffer().


Below is my code, feel free to correct me if I'm doing something incorrectly.


 

int OnInit()
  {
      PivotHandle = iCustom(_Symbol, PERIOD_CURRENT, "Downloads\\Fibo pivots",
                         PivotTimeFrame,
                         inputLevels,
                         inpPivot,
                         inpFiboUp,
                         inpFiboDown);  

   return(0);
  }

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   //Create Array for Pivot Levels
   double PivotValue[];
   double R1Value[];
   double S1Value[];
   double R2Value[];
   double S2Value[];
   double R3Value[];
   double S3Value[]; 

   //Sort Pivot Level Arrays as series
   ArraySetAsSeries(PivotValue, true);
   ArraySetAsSeries(R1Value, true);
   ArraySetAsSeries(S1Value, true);
   ArraySetAsSeries(R2Value, true);
   ArraySetAsSeries(R3Value, true);
   ArraySetAsSeries(S3Value, true);
   
   //Copy Pivot Levels into Pivot arrays
   CopyBuffer(PivotHandle, 1, 0, 1, PivotValue);
   if (CopyBuffer(PivotHandle, 0, 0, 1, PivotValue) < 0) {Print("CopyBuffer Pivot Level error =",GetLastError());}
   
   Alert("Pivot Value =", DoubleToString(PivotValue[0], 8));
  }
Fibo Pivots
Fibo Pivots
  • www.mql5.com
Fibonacci Pivot points indicator that can draw any number of levels for any of the known timeframes usable by MetaTrader 5. To insert any level, simply enter the level in the levels parameter separated by ";" in the list of levels. Defaults used are 38.2%, 61.8% and 100%, but you can customize those to any levels desired.
Files: