//+------------------------------------------------------------------+ //| 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