Discussion of article "Library for easy and quick development of MetaTrader programs (part XXII): Trading classes - Base trading class, verification of limitations"
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Library for easy and quick development of MetaTrader programs (part XXII): Trading classes - Base trading class, verification of limitations has been published:
In this article, we will start the development of the library base trading class and add the initial verification of permissions to conduct trading operations to its first version. Besides, we will slightly expand the features and content of the base trading class.
To check the work of the methods checking trading limitations, we need to artificially create them.
For example:
Click the position opening button in the EA trading panel. The following entry appears in the journal:
Let's eliminate the restrictions one by one.
After enabling the Internet connection, we obtain the following message when attempting to open a position:
Enable auto trading in the terminal clicking the AutoTrading button. When attempting to open a position, we obtain the following:
Press F7 and allow the EA to trade in its settings. When attempting to open a position, we are finally successful:
Other limitations can be checked in the tester or a demo account by creating a situation when one of the limitations is activated, for example, a limitation by the maximum number of pending orders on the account.Author: Artyom Trishkin