921 B
921 B
Trade Libnrary
a built-in library in MQL which is used to manipulate and manage Trade Positions in Expert Advisors.
for using this library, at the first step yopu have to include it oin your EA. this happens like this:
#include <Trade/Trade.mqh>
then you can access to it's provided stuffs.
CTrade
it is a Class, which provides Trading Management functionalities for MQL Programmers ...
here are it's documentation.
this class is an static class and there is no need to call any constructor for it's usage. simple making it's instance by assigning a name to it's type:
CTrade trader;
now you can acssess to all of it's provided actions, methods and etc to manipulate trade positions ...
NOTE for using this class you have to enable Auto Trading and also for your EA check it's checkbox for allow AutoTrading ...