Market is closed
How can I get info that the market is closed?
| IsTradeAllowed( |
) |
When market is closed, your EA/Indicator don't receive tick, so no code is executed. Unless you are using a script ?
My code does not work that way.
My code in init(), in a while(true) loop.
My code does not work that way.
My code in init(), in a while(true) loop.
Just some idea.
1. Send tiny pending order a hundred thousand miles away from current market price, and you'll get market is closed error.
2. Bar Time on M1 does not change at all, but TimeLocal already over a minute.
![]()
Just some idea.
1. Send tiny pending order a hundred thousand miles away from current market price, and you'll get market is closed error.
2. Bar Time on M1 does not change at all, but TimeLocal already over a minute.
ok, thank you!
- Init is expected to return. While there you can't open the parameter list.
- Why are you complicating your code with the while? Means you can't use the tester. Return from start and wait for the next tick.
I do not want to test. My algoritm too complicating for test.
How can I get info that the market is closed?