Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. Its absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
The double number representation is 64 bits, which makes it very high precision (though not mathematically exact).
Lines on the screen are limited by the screen resolution, which is of the order of 10 bits.
Obviously when plotting two double numbers onto the screen, you might need to put them on the same pixels even if the numbers are different.
As a rule of thumb, double numbers that are computed by different calculations very rarely end up equal, even when you think they should; very, very small differences (down to 20:th decimal or so), but enough for "==" to say false.
By your test, the lines were required to be equal to the highest precision offered by the representation, while by my suggestion, they are only required to be equal to a Point precision.
Perhaps you would really want "Point*Period/6" or something since the idea of MA lines "being equal" might also depend on the chart time frame; on an hourly time frame, perhaps being within 10 pips of each other is equal enough to be considered equal?