MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Checkup  IsTradeAllowed

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
bool IsTradeAllowed( )
Returns TRUE if the expert is allowed to trade and a thread for trading is not occupied, otherwise returns FALSE.
See also IsDllsAllowed(), IsLibrariesAllowed(), IsTradeContextBusy().
Sample:
  if(IsTradeAllowed()) Print("Trade allowed");