//+------------------------------------------------------------------+ //| SB_PivotPoints.mq4 - free indicator by StockBook | //| https://stockbook.blvis.in | //+------------------------------------------------------------------+ #property copyright "StockBook" #property link "https://stockbook.blvis.in" #property version "1.00" #property description "Classic daily pivot points (Pivot, R1, R2, S1, S2). For analysis only, not investment advice." #property strict #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 clrGold #property indicator_color2 clrTomato #property indicator_color3 clrTomato #property indicator_color4 clrLimeGreen #property indicator_color5 clrLimeGreen double PP[],R1[],R2[],S1[],S2[]; int OnInit() { SetIndexBuffer(0,PP); SetIndexBuffer(1,R1); SetIndexBuffer(2,R2); SetIndexBuffer(3,S1); SetIndexBuffer(4,S2); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); for(int k=1;k<5;k++) SetIndexStyle(k,DRAW_LINE,STYLE_DOT,1); SetIndexLabel(0,"Pivot"); SetIndexLabel(1,"R1"); SetIndexLabel(2,"R2"); SetIndexLabel(3,"S1"); SetIndexLabel(4,"S2"); IndicatorShortName("SB Pivot Points"); return(INIT_SUCCEEDED); } int start() { int counted=IndicatorCounted(); if(counted<0) return(-1); int limit=Bars-counted; if(counted>0) limit++; if(limit>Bars) limit=Bars; for(int i=0;i