//+------------------------------------------------------------------+ //| b-clockL_mtf b-clock.mq4 | //| Core time code by Nick Bilak | //| http://metatrader.50webs.com/ beluck[at]gmail.com | //| mtf light fxtsd.com 2007 ki modified by adoleh2000 and dwt5 | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Nick Bilak" #property link "http://metatrader.50webs.com/" #property indicator_chart_window extern color ClockColor = Magenta; extern int TimeFrame=0; extern string TimeFrames = "M1;5,15,30,60H1;240H4;1440D1;10080W1;43200MN|0-CurrentTF"; string comm; //---- buffers double s1[]; //+------------------------------------------------------------------+ int deinit() { ObjectDelete("time"); return(0); } //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { } return(0); //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { double i; int m,s,k; if (TimeFrame ==0) comm=" current"; if (TimeFrame ==0)TimeFrame=Period(); m=iTime(NULL,TimeFrame,0)+TimeFrame*60 - TimeCurrent(); i=m/60.0; s=m%60; m=(m-m%60)/60; Comment("TF["+TimeFrame,comm+"]: "+ m + " minutes " + s + " seconds left to bar end"); ObjectDelete("time"); if(ObjectFind("time") != 0) { ObjectCreate("time", OBJ_TEXT, 0, Time[0], Close[0]+ 0.0005); ObjectSetText("time", " <"+m+":"+s, 8, "Arial", ClockColor); } else { ObjectMove("time", 0, Time[0], Close[0]+0.0005); } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains close prices for each bar
Series array that contains open time of each bar
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: