Quote:
Originally Posted by Linuxser
Done.
I think it's working fine. Just change the number of the window where you want to drop the indicator.
|
Hello folks,
I found a bug in the DollyClock_Lnx indicator that I fixed. See revised indicator DollyClock_LnxV2.mq4 attached. The original looked like this:
string str_gmt;
if((brokerTime-GMT)>=0)
str_gmt="GMT+"+DoubleToStr((brokerTime-GMT)/3600,0);
else
str_gmt="GMT-"+DoubleToStr((brokerTime-GMT)/3600,0);
GMT and brokerTime are integers who's difference is not exactly divisible by 3600 seconds most of the time. This is because broker servers tend to be a couple or a few seconds slower than true time. If you divide an integer by an integer the quotient is truncated. So if the difference between broker time and GMT is 1.992 hours for a GMT +2 broker, the code above returns GMT+1. If you replace 3600 with 3600.0 the indicator returns GMT+2, since it recognizes that 3600.0 is a double data type, allowing decimal places and avoiding truncation.
WRR