[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 149

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
i always use a certain +/-epsilon=Point*0.01 when comparing prices.
Multiplying by 1,000,000 won't do anything. believe me.
I don't quite understand why there should be a problem <- bug?
In the documentation:
i.e. there's a maximum of 8 decimal places, and the question mentioned 10 - maybe that's the issue?
When comparing two variables of type double, sometimes an incorrect result is obtained. This is probably because one of the variables may be slightly larger or smaller than the other (e.g. by 10 digits). Using the NormalizeDouble function does not help in most cases. Some people advise to subtract one variable from another, but in such a case, how to most correctly construct an expression if(a>=b), subtracting one variable from another? Or maybe there is some other way?
I remembered a problem I observed myself a long time ago (maybe something has changed since then, I don't know):
a=5 and c=4.0.
From the MQ point of view it is not necessarily true that a>c in this particular case.
It would be true if a=5.0 and c=4.0, or a=5 and c=4.
Good afternoon!
Suppose we have two numbers 1.4451 and 1.4429.
How to take the last digit of 1.445[1] and 1.442[9] from these numbers ?
Good afternoon!
Suppose we have two numbers 1.4451 and 1.4429.
How to take the last digit of 1.445[1] and 1.442[9] from these numbers ?
x = (10000 * y) % 10
and can it be written with numbers for the idiots...
Thanks in advance!!!
Good day! May I repeat myself? I am using MACDAC as a trend filter in my EA, is it possible to make my EA start analysing the signals only from a certain bar on a macdak and then when the trend changes, everything changes again? For example MAKDAK>0 beginning of a trend, begin to analyse the signals only after the 15th bar of a Makdak which is greater than zero?
THANK YOU!
Can it be written with numbers, so that for idiots...
Thanks in advance!!!
1.MQL4 Reference (MetaEditor)-->Language Basics-->Operations and Expressions-->Arithmetic Operations
2.Tutorial -->https://book.mql4.com/ru/basics/expressions
Hello, may I repeat myself? I am using MACDAC as a trend filter in my EA, is it possible to make my EA start analyzing the signals only from a certain bar on the macdak and, if the trend changes, start analyzing the signals again? For example, MACD>0 start a trend, start to analyse the signals only after the 15th bar of the macdak which is higher than zero?
THANK YOU!
What is the problem? Remember the Bar (time) when the MACD crosses 0, and for each new Bar compare how far away it is from it. If Delta>15 => go ahead.
Please advise what is wrong!
Please advise what is wrong!
.. When testing using the "All Ticks" method.
Global variable is set at the beginning (before start() ):