Simple Bar Timer - converting to MQL5 - problem
pc = (100 * sec) / (_Period * 60);
Bad practice. What is the value of _Period ?
Use PeriodSeconds() instead.
Thank you very much for putting me on the right track! Works perfectly now.
pc = (100 * sec) / (Period() * 60);Int/Int is an int. On MT4 v434, division quotient don't give floating point values(Bug??) - MQL4 forum
Hi all,
here a very simple Bar Timer that i am trying to convert from MQL4 to MQL5. In Metatrader 4 it works well on all timeframes.
The problem -
in MT5 it works properly on timeframes below an hour, but anything above an hour it refuses to update. Anybody got an idea of what i may be doing wrong?
Here the MQL4 version that works properly;
Thanks in advance!