opposite trade

 

Hi Everyone

Weird thing with MT4 build 445

I have an ea that is taking correct trades at times and once in a while takes an opposite trade 

i.e  when the condition is good to take a short it takes a long but only sometimes

broker FXDD

Any suggestions

Thank you in advance 

 
newosan:

Any suggestions

Thank you in advance 

Fix your code.
 
newosan: I have an ea that is taking correct trades at times and once in a while takes an opposite trade 
Fix it. There are no mind readers here. Do you really expect any other answer without seeing the code?