//+------------------------------------------------------------------+ //| GoldSpread.mq4 | //| Copyright © 2009, C-4, All Rights Reserved. | //| vs-box@mail.ru | //+------------------------------------------------------------------+ #property copyright "Copyright © 2009, C-4, All Rights Reserved." #property link "vs-box@mail.ru" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red extern string symbol_name="DX_CONT";//Название инструмента индекса доллара, выставляется вручную. double GoldSpread[], SpreadDG[]; int init() { IndicatorBuffers(2); SetIndexBuffer(0,GoldSpread); SetIndexBuffer(1,SpreadDG); IndicatorShortName("Gold Spread of Williams"); SetLevelValue(0,0.0); SetLevelValue(1,0.3); SetLevelValue(2,-0.3); if(iTime(symbol_name,0,0)==0){ Print("Указано несуществующее название инструмента. Дальнейшее отображение индикатора будет невозможно."); Print("Присвойте переменной symbol_name название существующего инструмента(индекса доллара)."); } return(0); } int start() { if(iBars(symbol_name,0)==0)return(1); int limit,counted_bars; counted_bars=IndicatorCounted(); limit=Bars-counted_bars; for(int i=0; i