Made some minor changes,
void Object_Time() { int Object_Time_16 = Time[0] + 60 * Period() - TimeCurrent(); double Object_Time_8 = Object_Time_16 / 60.0; int Object_Time_20 = Object_Time_16 % 60; Object_Time_16 = (Object_Time_16 - Object_Time_16 % 60) / 60; string text = StringFormat("%d:%02d",Object_Time_16, Object_Time_20); if(ObjectFind(timerName) != 0) { ObjectCreate(timerName, OBJ_TEXT, 0, Time[0]+PeriodSeconds(), Close[0]); ObjectSetInteger(0, timerName, OBJPROP_ANCHOR, ANCHOR_LEFT_UPPER); ObjectSetText(timerName, text, 14, "Arial", Orange); return; } ObjectMove(timerName, 0, Time[0]+PeriodSeconds(), Close[0]); ObjectSetText(timerName, text); }
1) Rather than passing the name, create a global variable let say, "timerName ="time"", it is easier to make changes, rather going through the entire code, if you need to modify something.
2) 0.0005 from the close is dependent on the symbol digits and timeframe, will not be as small as you think. A lot can be simplified, but that I left the core of your code.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I am adding a Object to the chart which calculate Time remaining for the candle.
Code
Error :
Timer is not close to candle.