Help! Close order and open opposite direction of trade on MQL5
Chakrit Dumrongthaveesak:
//want to close all order and then open another direction order at the same time // buy 10 microlot if (signal =="buy") ... // sell 10 microlot if (signal =="sell") ...
Can you show us your attempt on your want?
Shengjie Mao:
Can you show us your attempt on your want?
//want to close all order and then open another direction order at the same time // buy 10 microlot if (signal =="buy") //close all sell position and open buy position instead with 0.1 lot, no TP&SL // sell 10 microlot if (signal =="sell") //close all buy position and open sell position instead with 0.1 lot, no TP&SL
Show your attempt with code, not description.
Hi
I am trying to close an order and open an order in the opposite direction automatically on MQL5 under buy and sell signal that I have already created. So, if there is a buy signal, it should close the previous sell order and open buy order at the same time. Likewise, if there is a sell signal, it should close the previous buy order and open sell order. I am new to the program. Can anyone help me please?
Thank you.