//+------------------------------------------------------------------+
//| SynchroWindow.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Lime
//--- input parameters
extern string Paar="GBPUSD"; // Æåëàåìûé èíòðóìåíò äëÿ ñðàâíåíèÿ
extern int PERIOD=0; // Òàéìôðåéì. Åñëè 0, òî òàêîé æå êàê ó îñíîâíîãî ãðàôèêà. Âàðèàíòû: 1,5,15,30,240,1140,10080,43200
//--- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
string short_name=Paar;
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
IndicatorShortName(short_name);
SetIndexLabel(0,short_name);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i, counted_bars=IndicatorCounted();
i=counted_bars-1;
//----
while(i>=0){
ExtMapBuffer1[i]=iClose( Paar, PERIOD,i) ;
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+y
Comments