if (NormalizeDouble(Bid,_Digits) == NormalizeDouble(Bid,3))
FrKal: can you please advise me how to program EA to identify the value of just specified decimal? For example Identify 1.43200 as x.xxx00 (something like "LastTwoAreZeros == true"). |
|
Taras Slobodyanik:
if (NormalizeDouble(Bid,_Digits) == NormalizeDouble(Bid,3)) |
|
Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it.
Show me where it is written in the documentation for MT4 - MT5.
And then I will follow your advice.
Doubles are rarely equal.
Yes you are right.
Taras Slobodyanik: Show me where it is written in the documentation for MT4 - MT5.
| Show me one use where it is correct. It's use is always wrong |
@ Taras Slobodyanik: Thank you, it looks very logical, I do not know why I did not see it.
@ whroeder1: Thank you as well. I get your point but have trouble with understand it (MathNearest and such). I will study your comment and try it and hope I will. Thank you, you push me up.

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,
can you please advise me how to program EA to identify the value of just specified decimal?
For example Identify 1.43200 as x.xxx00 (something like "LastTwoAreZeros == true").
The only thing I came with is list all the values I want (for example "if Price = 1.43200 || 1.43300 || 1.43100" etc.) but is there a more automated option?
Thank you for the answers.
FrKal