Some Problems in create a Pivot Indicator

 

Hi friends

I try to create a Pivot Standard Indicator as a practice. I want to set 7 level in this Indicator.(R3-R2-R1-P-S1-S2-S3)

Do I need to set "indicator_buffers property =7 " AND "indicator_plots property=7" for these levels? if the answer is NO , How should I set property for my indicator? 

#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_plots   7
//--- plot R3
#property indicator_label1  "R3"
#property indicator_type1 DRAW_SECTION
#property indicator_color1  clrRed
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- plot R2
#property indicator_label2  "R2"
#property indicator_type2   DRAW_SECTION
#property indicator_color2  clrDarkOrange
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//--- plot R1
#property indicator_label3  "R1"
#property indicator_type3   DRAW_SECTION
#property indicator_color3  clrGold
#property indicator_style3  STYLE_SOLID
#property indicator_width3  1
//--- plot P
#property indicator_label4  "P"
#property indicator_type4   DRAW_SECTION
#property indicator_style4  STYLE_SOLID
#property indicator_width4  1
//--- plot S1
#property indicator_label5  "S1"
#property indicator_type5   DRAW_SECTION
#property indicator_color5  clrMediumSpringGreen
#property indicator_style5  STYLE_SOLID
#property indicator_width5  1
//--- plot S2
#property indicator_label6  "S2"
#property indicator_type6   DRAW_SECTION
#property indicator_color6  clrLawnGreen
#property indicator_style6  STYLE_SOLID
#property indicator_width6  1
//--- plot S3
#property indicator_label7  "S3"
#property indicator_type7   DRAW_SECTION
#property indicator_color7  clrCadetBlue
#property indicator_style7  STYLE_SOLID
#property indicator_width7  1

//--- indicator buffers

double         R3Buffer[];
double         R2Buffer[];
double         R1Buffer[];
double         PBuffer[];
double         S1Buffer[];
double         S2Buffer[];
double         S3Buffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,R3Buffer,INDICATOR_DATA);
   SetIndexBuffer(1,R2Buffer,INDICATOR_DATA);
   SetIndexBuffer(2,R1Buffer,INDICATOR_DATA);
   SetIndexBuffer(3,PBuffer,INDICATOR_DATA);
   SetIndexBuffer(4,S1Buffer,INDICATOR_DATA);
   SetIndexBuffer(5,S2Buffer,INDICATOR_DATA);
   SetIndexBuffer(6,S3Buffer,INDICATOR_DATA);
  
   
   return(INIT_SUCCEEDED);
  }
 
mahmoodi1072:

Hi friends

I try to create a Pivot Standard Indicator as a practice. I want to set 7 level in this Indicator.(R3-R2-R1-P-S1-S2-S3)

Do I need to set "indicator_buffers property =7 " AND "indicator_plots property=7" for these levels? if the answer is NO , How should I set property for my indicator? 

Use MQL5 Wizard -> Custom Indicator

Creating a ready-made Expert Advisor - MQL4/MQL5 Wizard - MetaEditor Help
Creating a ready-made Expert Advisor - MQL4/MQL5 Wizard - MetaEditor Help
  • www.metatrader5.com
MQL4/MQL5 Wizard allows creating fully operational EAs based on the standard library supplied together with the trading platform. To do this...
 
thank you