//+------------------------------------------------------------------+ //| a.mq5 | //| Copyright 2010, MetaQuotes Software Corp. | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2010, MetaQuotes Software Corp." #property link "http://www.mql5.com" #property version "1.00" #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 #property indicator_type1 DRAW_LINE #property indicator_color1 Blue #property indicator_style1 STYLE_SOLID #property indicator_width1 2//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ double eeee[]; int OnInit() { //--- indicator buffers mapping SetIndexBuffer(0,eeee,INDICATOR_DATA); //--- return(0); } //+------------------------------------------------------------------+ //| 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[]) { //--- for(int i=0;i<=rates_total-1;i++) { eeee[i]=close[i]; } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+