I wonder if it’s possible to do a check from mql5 code if trading of certain instrument at a given time is possible. The reason I’m asking this is, because my EA, opens multiple orders of different instruments, it is some kind of “hedging” strategy. So the problem I’ve faced when testing it on demo account is, that my EA opened position of EURUSD but couldn’t USDJPY, because broker temporarly disabled opening new positions with this instrument on some heavy news events. So before I open any position I would like to check if all insturments I need are “allowed to trade”, if not, I don’t trade.
I’ve found this thread https://www.mql5.com/en/forum/153486, but looks similar to what I need, but if I try to use this comand, compiler doesn’t recognize it, so it looks it is not availabe anymore in newer builds of MT5. Any other idea maybe?
Much thanks for your input.