//+------------------------------------------------------------------+ //| Empty SubWindow.mq5 | //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_minimum -10 #property indicator_maximum 10 #property indicator_buffers 1 #property indicator_plots 1 #property indicator_label1 "Label1" #property indicator_type1 DRAW_NONE //#property indicator_color1 clrRed //#property indicator_style1 STYLE_SOLID ////--- indicator buffers double Label1Buffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { SetIndexBuffer(0,Label1Buffer,INDICATOR_DATA); ArraySetAsSeries(Label1Buffer,true); 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 start; if(prev_calculated>1) start=prev_calculated-1; else start=1; for(int i=start;i