Reassigning variables is not working

 

Thanks, Mac 

 
mountainman:

My EA is running into a logical error. It should only enter trades at certain times where two conditions are met. The EA enters trades when only one of the conditions are met. The second trade condition that is not working is

This "if" statement is always registering as true and it shouldn't. 

How do you know ?  did you Print() all the variables so you can see what they are ?  comparing double values is problematic,  you should read this and ensure ou are comparing doubles in a valid way : Can price != price ?
 
RaptorUK:
How do you know ?  did you Print() all the variables so you can see what they are ?  comparing double values is problematic,  you should read this and ensure ou are comparing doubles in a valid way : Can price != price ?

And see here too https://www.mql5.com/en/forum/140534