Can You please elaborate, i'm just learning how to code. I just need the value of last open price to make a condition for closing orders. Example is if the last open position is 100 pips below the current price it will execute the command to close all open positions. Thats all I need for the last open position.
Can You please elaborate, i'm just learning how to code. I just need the value of last open price to make a condition for closing orders. Example is if the last open position is 100 pips below the current price it will execute the command to close all open positions. Thats all I need for the last open position.
Here is a good start:
https://www.mql5.com/en/docs/trading
Begin with PositionsTotal()
continue with PositionSelectByTicket()
then follow docs on PositionGet***()
Here is a good start:
https://www.mql5.com/en/docs/trading
Begin with PositionsTotal()
continue with PositionSelectByTicket()
then follow docs on PositionGet***()
i'll try sir thanks.