Is `IsTradeAllowed` the same as MODE_TRADEALLOWED?

 

Hello,

Is `IsTradeAllowed()` replaceable with `MarketInfo(_Symbol, MODE_TRADEALLOWED)` and vice versa?


In the docs is written that `IsTradeAllowed` is equal to  `TerminalInfoInteger(TERMINAL_TRADE_ALLOWED )`.


However, it is not clear is `IsTradeAllowed` means the trading is allowed by principle or it is allowed at exactly that moment for that symbol.


Anyway, having three very similar functions is confusing.

 
Miroslav Popov:

Is `IsTradeAllowed()` replaceable with `MarketInfo(_Symbol, MODE_TRADEALLOWED)` and vice versa?

In the docs is written that `IsTradeAllowed` is equal to  `TerminalInfoInteger(TERMINAL_TRADE_ALLOWED )`.

However, it is not clear is `IsTradeAllowed` means the trading is allowed by principle or it is allowed at exactly that moment for that symbol.

Anyway, having three very similar functions is confusing.

I believe IsTradeAllowed() is equivalent to MarketInfo(_Symbol, MODE_TRADEALLOWED) (which depends on the server and market),

but these are different from TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) (which is just a local setting in your MT4 options).