Indicators Time

 

Hi everybody...


How we can made a function in mt4 editor to count time as a common clock second by second independent of tick value from the broker...

 
We can easily make such codes for EA and Script where we use sleep() function and that also work correctly but there is a way do so in indicator because this sleep () in not allowed in the indicators...
 
NOOR GHANI RAHMAN:

Hi everybody...

How we can made a function in mt4 editor to count time as a common clock second by second independent of tick value from the broker...

Check out https://www.mql5.com/en/docs/eventfunctions/eventsettimer

Documentation on MQL5: Working with Events / EventSetTimer
Documentation on MQL5: Working with Events / EventSetTimer
  • www.mql5.com
The function indicates to the client terminal, that for this indicator or Expert Advisor, events from the timer must be generated with the specified periodicity. Normally, this function must be called from the OnInit() function or from a class constructor. In order to handle events coming from the timer, the Expert Advisor must have the...
 

Thanks Sir... I have try this function already but still there is jumping in seconds when I run the indicator on mt4. but by use of this no such jumping as without this... it increase timing efficiency but did not work as a common watch..

 

Hi have you tried 

EventSetMillisecondTimer(ms);

This has a faster rate then EventSetTimer(s)

 
Marco vd Heijden:

Hi have you tried 

This has a faster rate then EventSetTimer(s)

I now see this one... and I am checking it to test... Great

Thanks

 

Thanks so much... I also see EventSetMilliSeconds() there and thought that will work...

Reason: