Forum

Need only 1 pending order sent when price rouch or break S/R

Hello, I am trying to create an EA where the condition is : At the beginning, price is between support and resistant line. if price break resistant, then create only 1 Sell stop pending order price at middle of S/R. but if price back to between S and R price, and going up and break the resistant

What is wrong in this script ? (a delete opposite pending order script)

Hi, I'm new in mql programming and trying to create an EA, which the idea is check a buy stop order if executed then delete the sell order and vice versa.. The buy stop and sell stop order are open manually, the order ticket are use for ea input. But when I try it in demo, when 1 order is executed