//+------------------------------------------------------------------+ //| Full Bars.mq5 | //| Copyright 2021, ernst | //| https://www.mql5.com/en/users/pippod | //+------------------------------------------------------------------+ #property copyright "Copyright 2021, ernst" #property link "https://www.mql5.com/en/users/pippod" #property version "1.00" #property indicator_chart_window #property indicator_buffers 5 #property indicator_plots 1 //--- plot Label1 #property indicator_label1 "High;Open;Close;Low" #property indicator_type1 DRAW_COLOR_CANDLES #property indicator_color1 clrLimeGreen,clrFireBrick,clrYellow #property indicator_style1 STYLE_SOLID #property indicator_width1 1 //--- indicator buffers double Open[]; double High[]; double Low[]; double Close[]; double Color[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SetIndexBuffer(0,Open,INDICATOR_DATA); SetIndexBuffer(1,High,INDICATOR_DATA); SetIndexBuffer(2,Low,INDICATOR_DATA); SetIndexBuffer(3,Close,INDICATOR_DATA); SetIndexBuffer(4,Color,INDICATOR_COLOR_INDEX); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- int begin=(rates_total!=prev_calculated)?prev_calculated:prev_calculated-1; //--- double opn,cls; for(int i=begin;iopn?0:cls