How can I close an opened position if a statement is true...

To add comments, please log in or register
Murat Yazici
1338
Murat Yazici  

Hi,

I have an EA. The EA can open orders according to some rules. It can set a take profit and stop loss point.

if my statement is true, the EA should not wait to stop loss and close the order. Forexample, if SMA(15)>SMA(50) for a sell position.

I read PositionClose but there is not an example. Can you help me please?

Best,

Murat Y. 

Marco vd Heijden
Moderator
8635
Marco vd Heijden  
OrderClose - Trade Functions - MQL4 Reference
OrderClose - Trade Functions - MQL4 Reference
  • docs.mql4.com
OrderClose - Trade Functions - MQL4 Reference
Murat Yazici
1338
Murat Yazici  

Thank you!!

To add comments, please log in or register