//+------------------------------------------------------------------+ //| ytg_NO_CONNECT.mq4 | //| Yuriy Tokman | //| http://www.mql-design.ru | //+------------------------------------------------------------------+ #property copyright "Yuriy Tokman" #property link "http://www.mql-design.ru" #property indicator_separate_window extern string Copyright = "Forex InvEST Group"; extern string Best_Experts_For_Sale = "http://soft4forex.com/"; extern string e_mail = "soft4forex@forexinvest.ee"; extern string Skype = "forex.invest.group"; extern string mark = "l"; extern color colir = Green; string short_name; string char1[256]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators int i; for (i = 0; i < 256; i++) char1[i] = CharToStr(i); IndicatorShortName (char1[104]+char1[116]+char1[116]+char1[112]+char1[58]+char1[47]+char1[47]+char1[119]+char1[119]+char1[119]+char1[46]+char1[109]+char1[113]+char1[108]+char1[45]+char1[100]+char1[101]+char1[115]+char1[105]+char1[103]+char1[110]+char1[46]+char1[114]+char1[117]); Label("ytg_logo_8", char1[104]+char1[116]+char1[116]+char1[112]+char1[58]+char1[47]+char1[47]+char1[119]+char1[119]+char1[119]+char1[46]+char1[109]+char1[113]+char1[108]+char1[45]+char1[100]+char1[101]+char1[115]+char1[105]+char1[103]+char1[110]+char1[46]+char1[114]+char1[117], 3,450,5,14,"Arial",Lime); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- GetDellName (); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- int period = Period(); if(period!=1){ Alert("Use the indicator on the period М1.");return;} int win_idx=WindowFind("http://www.mql-design.ru"); datetime time_m1 = iTime(Symbol(),Period(),0); TxtGraf("ytg_metka"+time_m1, "l", time_m1, 0, win_idx, colir,"Wingdings"); //---- return(0); } //+------------------------------------------------------------------+ //| Функция отображения текста | //| автор: Юрий Токмань | //| e-mail: yuriytokman@gmail.com | //| ICQ# 481-971-287 | //| Skype: yuriy.g.t | //+------------------------------------------------------------------+ void TxtGraf(string labebe, string txt, datetime time1, double price1, int window=0, color colir = Brown, string tt = "Times New Roman") { if (ObjectFind(labebe)!=-1) ObjectDelete(labebe); ObjectCreate(labebe, OBJ_TEXT, window, time1, price1); ObjectSetText(labebe, txt, 8, tt, colir); ObjectSet(labebe, OBJPROP_BACK, true); } //----+ void GetDellName (string name_n = "ytg_") { string vName; for(int i=ObjectsTotal()-1; i>=0;i--) { vName = ObjectName(i); if (StringFind(vName,name_n) !=-1) ObjectDelete(vName); } } //----+ void Label(string name_label,string text_label,int corner = 2,int x = 3,int y = 15,int font_size = 10,string font_name = "Arial",color text_color = LimeGreen ) { if (ObjectFind(name_label)!=-1) ObjectDelete(name_label); ObjectCreate(name_label,OBJ_LABEL,0,0,0,0,0); ObjectSet(name_label,OBJPROP_CORNER,corner); ObjectSet(name_label,OBJPROP_XDISTANCE,x); ObjectSet(name_label,OBJPROP_YDISTANCE,y); ObjectSetText(name_label,text_label,font_size,font_name,text_color); }