Why don't you have candle timer for MT5?

 
Why don't you have a candle timer for MT5? Or do you have one? If not, do you have any plans? I'll wait for your answer, thanks
 
abdullaevoo Абдуллаев:
Why don't you have a candle timer for MT5? Or do you have one? If not, do you have any plans? I'll wait for your answer, thanks
There is already a candle timer indicator available in the CodeBase. Let me know if you need assistance locating it.
 
abdullaevoo Абдуллаев:
Why don't you have a candle timer for MT5? Or do you have one? If not, do you have any plans? I'll wait for your answer, thanks
See attached.
 

Code Base

Price Line 3

Rajesh Kumar Nait, 2023.01.14 20:51

Shows moving Last Price on Bid Line, LAst 24 hours percentage change, switch chart from arrow keys and more..

 
Ryan L Johnson #:
See attached.
Bad code. No tick, no update.
 
Rajesh Kumar Nait #:

Similar bad code.
 
Alain Verleyen #:
Bad code. No tick, no update.
Alain Verleyen #:
Similar bad code.

Explained here why : 

Forum on trading, automated trading systems and testing trading strategies

Scripts: Simple Bar Timer

Alain Verleyen, 2025.12.30 21:24

Strictly speaking this script will not work correctly depending on the symbols selected in the Market Watch.

TimeCurrent() is returning the last update time of any symbol in the Market Watch, if they are a lot of symbols then fine, if there are only symbol(s) with low activity, your counter will not move.

Additionally, using sleep(1000), you can have a shift of almost 1 second in your counter.

 Exemple : it should be 00:37:05


 
Alain Verleyen #:
Bad code. No tick, no update.

No worries. I didn't code it.

If you don't like it, then simply don't use it.

 
Ryan L Johnson #:

No worries. I didn't code it.

If you don't like it, then simply don't use it.

Please try to avoid taking all personally. I don't care who coded it and it's not about what I like or doesn't like.

One of my goal on this forum is to avoid poor code, bad code, buggy code to broadcast, with my smalls means.

 
Alain Verleyen #:

Please try to avoid taking all personally.

As I said, no worries.

 
Ryan L Johnson #:

No worries. I didn't code it.

If you don't like it, then simply don't use it.

There's been a few different approaches and they all work just fine. 

OnTick can be precarious because not always do ticks arrive, so OnTimer would be best or a constantly running while loop.