I don't know whether this may be a comparing doubles thing or not
Try replacing
&& OrderOpenPrice()==ActionPrice)
with
&& MathAbs(OrderOpenPrice()-ActionPrice)<Point
GumRai:
Thank you for help. Code works and I will use your suggestion.
I don't know whether this may be a comparing doubles thing or not
Try replacing
with
Rahle: Code works and I will use your suggestion.
&& OrderOpenPrice()==ActionPrice) | Now learn why The == operand. - MQL4 forum |
WHRoeder:
Thank you, very interesting link..I didn't got this at first time, but I will give it a second go. This might explain why I am constantly having Ghost in my code.
Rahle: Code works and I will use your suggestion. | Now learn why The == operand. - MQL4 forum |
This would never be true :
&& OrderOpenPrice()==ActionPrice)
double ActionPrice=2.0000
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, having long time problem understanding why I cannot find order in loop when looking for OrderOpenPrice. I have temporarly solved the problem by adding open price to comment but this is not solid solution.
Please suggest how to solve this. (In below code OrderComment() is commented out)