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
The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum
Ask >= OOP+n could be true because of round off and Ask >= OOP+n - 0.000005 and could be false at Ask >= OOP+n + 0.000005.
If the equality is important use (must be true at Ask == OOP+n) Use "definitely >=": Ask - (OOP+n) > -_Point/2. // Note the minus.
If the equality is important use (must be false at Ask == OOP+n) Use "definitely >" Ask - (OOP+n) > _Point/2.
If the equality is not important (false when equal or true when not) just use Ask > OOP+n
@whroeder1, I am still in the process of absorbing the equalities. I always thought it is only in Excel that such digits are so precise.
Anyway, I would like to as how this:
yielded significantly different results than this:
Once again, my readings and common logic seem to elude some deeper technicalities of machine language....
Also, if ever they are different, which is more in line with the standard definition of Trailing Stops. I still have in mind the very concise code with MathMax that you made a few posts ago.@whroeder1, I am still in the process of absorbing the equalities. I always thought it is only in Excel that such digits are so precise.
yielded significantly different results than this:1. That is clearer.
2. But the thing is that when I replaced the 1st block with the 2nd, backtesting it yielded significantly different results..... Could I have missed something else? Everything else was ensured to be held constant.
3. Err... Isn't it that when the code cycles every tick, it will compare the Current price vs the "target profit" c/o the existing StopLoss-Trailing Stop value? That is the way I understood Trailing Stop. At least on how to code trailing stop. Is it not the case? I also reversed the functions created by the EA generator and the MathMax example you taught...