//+------------------------------------------------------------------+ //| ytg_Day_candle.mq4 | //| Copyright © 2009, Yuriy Tokman | //| yuriytokman@gmail.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2009, Yuriy Tokman" #property link "yuriytokman@gmail.com" //24 и 48 (цена 2-SMMA )и в советнике и на графике #property indicator_chart_window //------- Внешние параметры индикатора ------------------------------- extern color lineColor = Lavender; // Цвет линий extern int TimeFrame = 1440; // Период графика extern int coun_bars = 5; // Колличество баров extern bool Comm = false; extern string AsiaBegin = "01:00"; // Открытие азиатской сессии extern string AsiaEnd = "10:00"; // Закрытие азиатской сессии extern color AsiaColor = C'89,89,89'; // Цвет азиатской сессии extern string EurBegin = "07:00"; // Открытие европейской сессии extern string EurEnd = "16:00"; // Закрытие европейской сессии extern color EurColor = C'89,89,89'; // Цвет европейской сессии extern string USABegin = "14:00"; // Открытие американской сессии extern string USAEnd = "23:00"; // Закрытие американской сессии extern color USAColor = C'89,89,89'; // Цвет американской сессии double st_b = 0;int brs = 0;double db = 0;int brc = 0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators string char1[256]; int i; for (i = 0; i < 256; i++) char1[i] = CharToStr(i); string txt = char1[121]+char1[117]+char1[114]+char1[105]+char1[121]+char1[116]+char1[111] +char1[107]+char1[109]+char1[97]+char1[110]+char1[64]+char1[103]+char1[109] +char1[97]+char1[105]+char1[108]+char1[46]+char1[99]+char1[111]+char1[109]; Comment("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n "+txt); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- string vName; for(int i=ObjectsTotal()-1; i>=0;i--) { vName = ObjectName(i); if (StringFind(vName,"candle_") !=-1) ObjectDelete(vName); } Comment(""); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; if(limit>coun_bars)limit=coun_bars; for(int i=limit; i>=0; i--) { db = (iHigh(Symbol(),TimeFrame,i+1)-iLow(Symbol(),TimeFrame,i+1))/Point; //----------------D1 if(Period()