Maybe I might have confused a bit...
Let's say StochA = %K = 100[(C - L14)/(H14 - L14)] with result of ResultA being reutnred from the indicator, which is called through the EA.
and StochB = %K = 100[(C - L14)/(H14 - L14)] with result of ResultB being returned from the indicator, which is called through the EA.
If I want to write a rule that says If ResultA > ResultB then return True, and the values returned are ResultA = 50.12345 and ResultB = 49.123
Is the result true or do I need to transform the data returned before or is it like for like and does not matter because they have been declared as a double value already?
Hope this is more clear?
Does the following ring true for MT4 and the declaration of the iCustom call or i[indicator] call when retrieving the value and storing for EA processing?
Note that most floating-point numbers a computer can represent are just approximations. One of the challenges in programming with floating-point values is ensuring that the approximations lead to reasonable results. If the programmeris not careful, small discrepancies in the approximations can snowball to the point where the final results become meaningless
To add comments, please log in or register