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
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
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!