MQL4 Reference Checkup IsTradeAllowed
|
IsTradeAllowedChecks if the Expert Advisor is allowed to trade and trading context is not busy.
The second form of the function checks trade status for the specified symbol in the specified time.
Parameters symbol [in] Symbol. tested_time [in] Time to check status. Returned value Returns true if the Expert Advisor is allowed to trade and trading context is not busy, otherwise returns false. Note: OrderSend(), OrderClose(), OrderCloseBy(), OrderModify(), OrderDelete() trading functions changing the state of a trading account can be called only if trading by Expert Advisors is allowed (the "Allow live trading" checkbox is enabled in the Expert Advisor or script properties). Example:
See also IsDllsAllowed(), IsLibrariesAllowed(), IsTradeContextBusy() |