Download MetaTrader 5

How can i avoid error 132 MARKET IS CLOSE when opening an order ?

To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
Wemerson Guimaraes
561
Wemerson Guimaraes 2016.02.11 01:52 

Hi, 

How can i avoid error 132 MARKET IS CLOSE when opening an order ?

I need to check if market is closed before opening an order.

whroeder1
14514
whroeder1 2016.02.11 13:23  

The market is open or you wouldn't have received a tick. But some brokers (e.g. FXCM) return market is closed in the first 5 minutes of roll over (5pm ET)

You can't avoid it. You must handle it. Same as you must handle NO_RESULT. I log the error, wait 30 seconds and return; check and retry the operation on the next tick.

Wemerson Guimaraes
561
Wemerson Guimaraes 2016.02.12 02:48  
WHRoeder:

The market is open or you wouldn't have received a tick. But some brokers (e.g. FXCM) return market is closed in the first 5 minutes of roll over (5pm ET)

You can't avoid it. You must handle it. Same as you must handle NO_RESULT. I log the error, wait 30 seconds and return; check and retry the operation on the next tick.

Ok, understand.
To add comments, please log in or register