//+------------------------------------------------------------------+ //| UKRAINE.mq4 | //| Yuriy Tokman (YTG) | //| yuriytokman@gmail.com | //+------------------------------------------------------------------+ #property copyright "Yuriy Tokman (YTG)" #property link "yuriytokman@gmail.com" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color2 Yellow #property indicator_color1 Blue #property indicator_width1 20 #property indicator_width2 20 #property indicator_maximum 1.2 #property indicator_minimum -1.2 extern string EA_forex_FREE = "http://www.forexinvest.ee"; double Up[]; double Dn[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorShortName("UKRAINE"); SetIndexBuffer(0,Up); SetIndexBuffer(1,Dn); SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexStyle(1,DRAW_HISTOGRAM); IndexLab(); Comment("\nÑËÀÂÀ ÓÊÐÀ¯Í²"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- 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(counted_bars==0) limit--; for(int i=limit; i>=0; i--) { Up[i]=1; Dn[i]=-1; } //---- return(0); } //+------------------------------------------------------------------+ void IndexLab() { string char1[256]; int i; for (i = 0; i < 256; i++) char1[i] = CharToStr(i); string txtt = char1[104]+char1[116]+char1[116]+char1[112]+char1[58]+char1[47]+char1[47]+char1[119]+char1[119] +char1[119]+char1[46]+char1[102]+char1[111]+char1[114]+char1[101]+char1[120]+char1[105]+char1[110] +char1[118]+char1[101]+char1[115]+char1[116]+char1[46]+char1[101]+char1[101] ; Label("label",txtt,2,3,15,10); } //----+ 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 Black",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); } //----+