Time - displayed on chart indicator wanted

JTrader

Guest
Messages
5,741
Likes
507
Hi

i've seen an MT4 indicator that displays the current price in the corner of the chart in big bold numbers - jacinto was using it.
I basically want the same type of thing to display the current PC systems time in the same way - eg. 07:47:58 - hours, minutes & seconds - so that i can see the countdown to a knew candles open and anticipate in advance. Does anyone know of the existence of such an indicator?

Thanks a lot.
 
coutdown

The attached is a custom indicator called Countdown. This will display the countdown to the new candle in mins and secs.

The trouble with all these type of indicators is that they rely on the next tick movemnet in price to change the time, so can sometimes lag at the start of a new bar/candle because MT4 only prints on a new tick.
 

Attachments

  • Countdown.mq4
    2.8 KB · Views: 1,911
  • countdown.gif
    countdown.gif
    2.3 KB · Views: 7,495
Thanks BB

Heres a similar one that can be set to alert - i.e. 1 min b4 bar closes.

I'll try yours as it is more along the lines of what i need.
 

Attachments

  • bar_close_alarm_V1.mq4
    1.9 KB · Views: 1,091
The attached is a custom indicator called Countdown. This will display the countdown to the new candle in mins and secs.

The trouble with all these type of indicators is that they rely on the next tick movemnet in price to change the time, so can sometimes lag at the start of a new bar/candle because MT4 only prints on a new tick.

I see what you mean about the next tick requirement. Still, its better than nothing i guess.
 
Re: coutdown

The attached is a custom indicator called Countdown. This will display the countdown to the new candle in mins and secs.

The trouble with all these type of indicators is that they rely on the next tick movemnet in price to change the time, so can sometimes lag at the start of a new bar/candle because MT4 only prints on a new tick.


Hi BB,

I am new to FX trading and I want to have that countdown timer. Could you advise please on how to install that? I have tried to put in under indicator but seems doesnt work.

Thanks
Sebastianus
 
Hi,

actually this kind of indicators are very easy to write.

The trouble with all these type of indicators is that they rely on the next tick movement in price to change the time, so can sometimes lag at the start of a new bar/candle because MT4 only prints on a new tick.

Not necessary, instead of writing pure indicator (which is updated only on new tick) you can write a script, with simply loop that updates your clock label every 500ms for example. That's all ;)

Here is the script that displays your pc time (localtime), if you still need that countdown I will write it when market goes live.

localtime.png


If you don't like default font/color or size, edit first few lines, if you don't like clock position, double click clock label and move it.

BR,
Krzysztof.
 

Attachments

  • localtime.mq4
    2 KB · Views: 1,217
Here is the script that displays your pc time (localtime), if you still need that countdown I will write it when market goes live.
Use an ea instead of a script. This way you can still execute scripts while the ea is running. Also, you don't have to rewrite it. Just convert the indicators on this thread to a script or an ea and make a continuous loop. Takes 1 minute. This actually could be very useful.

Peter
 
Use an ea instead of a script. This way you can still execute scripts while the ea is running

Well, I prefer to use ea for managing my trades and scripts for such tasks like clock displaying.

Also, you don't have to rewrite it
That's your opinion, I don't copy paste any source codes, usually more troubles then writing it from the scratch, besides, writing software is fun for me and it is also my job.

Takes 1 minute
If it takes one minute, why don't you do it on your own ;)

Best Regards,
Krzysztof.
 
That's your opinion, I don't copy paste any source codes, usually more troubles then writing it from the scratch, besides, writing software is fun for me and it is also my job.

If you don't mind my asking, what type of programs do you write? I used to write programs for the Federal Aviation Admin here in the USA way, way back when.Nothing exciting, just small projects and things. We used fortran (yikes!). Now all I use is html, javascript, and metatrader ea stuff. Only for personal use. I don't do it as a career.

Peter
 
I used to write programs for the Federal Aviation Admin here in the USA way, way back when.Nothing exciting, just small projects and things. We used fortran (yikes!).
Sounds like interesting job, currently I programming LTE Base Stations at Nokia Siemens Networks, mostly low level programming in C++/Assembler, nothing fancy. I used to working as a software developer for one private investor, doing jobs like FIX integration, connecting multiple brokers etc. Now I trying to manage my own account :)

BR,
Krzysztof.
 
Hi,

So I managed to make this countdown clock without server lag, its not perfect but it works quite well :D also I added progress bar... can be disabled/customized if you don't like it.

countdown1.png


here is on big time frame:

countdown2.png


Hi BB,

I am new to FX trading and I want to have that countdown timer. Could you advise please on how to install that? I have tried to put in under indicator but seems doesnt work.

Thanks
Sebastianus

Did you restart your MetaTrader terminal after that?

Regards,
Krzysztof.
 

Attachments

  • countdown.mq4
    4.5 KB · Views: 528
Last edited:
Thanks BB

Heres a similar one that can be set to alert - i.e. 1 min b4 bar closes.

I'll try yours as it is more along the lines of what i need.

Hi, is it possible to shift the text to the bottom left and with bigger font size?

I tried the countdown indicator, it cause the drawings to be erased everytime when I switch timeframes. Pls help.
 
Top