Basic Close Trades Question

 
Hey everyone! So I have written a few experimental EAs but none of them had set stop losses and take profits - it was instead based on crossovers. I am finally writing one with set S/L and T/P and I am wondering if I need to write specific code that closes those trades when they hit their S/L and T/P or if they will automatically close since I put that information when opening the order. Thank you!
 
jdgibbons88:
Hey everyone! So I have written a few experimental EAs but none of them had set stop losses and take profits - it was instead based on crossovers. I am finally writing one with set S/L and T/P and I am wondering if I need to write specific code that closes those trades when they hit their S/L and T/P or if they will automatically close since I put that information when opening the order. Thank you!

if you set the TP and SL when opening the order , it will automatically close it when the price hit either of those no need to manually do anything.

Reason: