The MetaTrader 5 mobile platform allows users to prepare and issue requests for the broker to execute trading operations. In addition, the platform allows to control and manage open positions. For this purposes, several types of trade orders are used. An order is an instruction of a brokerage firm's client to conduct a trade operation. In the...
bool CheckTradingPermission()
{
//--- For real-time modeif(IsRealtime())
{
//--- Checking server connectionif(!TerminalInfoInteger(TERMINAL_CONNECTED))
return(1);
//--- Permission to trade at the running programme levelif(!MQL5InfoInteger(MQL5_TRADE_ALLOWED))
return(2);
//--- Permission to trade at the terminal levelif(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
return(3);
//--- Permission to trade for the current accountif(!AccountInfoInteger(ACCOUNT_TRADE_ALLOWED))
return(4);
//--- Permission to trade automatically for the current accountif(!AccountInfoInteger(ACCOUNT_TRADE_EXPERT))
return(5);
}
//---return(0);
}
//+------------------------------------------------------------------+
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
While searching for examples of pending orders, I came across this article.
Couldn't the author have the mercy to put a working update here?
If even the MQL5 cookbook doesn't work, how is a beginner supposed to learn anything?
I'm getting a thick throat again!!!!!!!!
While searching for examples of pending orders, I came across this article.
Could the author have the mercy to put a functional update here?
If even the MQL5 cookbook doesn't work, how is a beginner supposed to learn anything?
I'm getting a thick throat again!!!!!!!!
Otto, what's your problem?
The article is a bit old, almost half a millennium of updates has passed since then.
I have orientated myself according to:
https://www.metatrader5.com/en/mobile-trading/iphone/help/trade/general_concept/order_types
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade
and solved it like this:
I understand Otto...
the thing has not been tested by anyone.
A function is used there that was never declared.
See picture
Code is for the arse :-)
Next nonsense...
Who notices?
Now compile it already.
Does anyone know where this function comes from? F1 does not know it. Neither does Google.
MQL5InfoInteger()h ttps:// www.mql5.com/de/docs/check/mqlinfointeger
Take a closer look amando
Next error in the code.
Indicator missing ....
It may be that the developer had it, but the one that freshly starts the download does not.
MQ urgently needs to work on this.
The user loses the desire to try it out if he first has to spend 3 hours removing bugs.