A simple program
if(Bid== price+TP*_Point || Bid==price-SL*_Point)
Doubles are rarely equal. Understand the links in:
The == operand. - MQL4 programming forum #2 (2013)
Good evening Mr Roeder,
Thank you for your reply, I have just read the messages in the other conversations and they have helped me a lot!
Thank you very much and have a nice evening :-)
Do not use == for comparing doubles. It's better to write it like this:
Bid >= price+TP*_Point Bid <= price-SL*_Point
and also keep in mind that you have to account for Spread.
you buy on Ask, and sell on Bid.
Thank you in advance for your answers