Trade once in one time

 

How to make code for mql 4 to buy/sell just once time?

Because in my ea, it makes open/buy many times in one time.

 

before order execution you can check OrdersTotal()>0

however if you are using some other variables (magic number, symbol) then you should make a function that will count orders with specified property (symbol, magic number, order type etc)

 
It's work. Thank you.
Reason: