|
Ating for MQL5
|
Class to handle trade requests. More...
Inheritance diagram for Request:
Collaboration diagram for Request:Public Types | |
| enum | ENUM_ORDER_PENDING_TYPE { ORDER_PENDING_TYPE_BUY = POSITION_TYPE_BUY , ORDER_PENDING_TYPE_SELL = POSITION_TYPE_SELL } |
| Enum for pending order types. More... | |
| enum | ENUM_PRIVATE_ATR_STRING { SYMBOL } |
| Enum for private string attributes. More... | |
| enum | ENUM_PRIVATE_ATR_DOUBLE { LOT_SIZE } |
| Enum for private double attributes. More... | |
| enum | ENUM_PRIVATE_ATR_ULONG { TAKE_PROFIT , STOP_LOSS , DEVIATION_TRADE , MAGIC_NUMBER } |
| Enum for private ulong attributes. More... | |
Public Member Functions | |
| Request () | |
| Default constructor for the Request class. | |
| void | UpdateAtr (string symbol_arg, double lot_size_arg, uint take_profit_arg, uint stop_loss_arg, uint deviation_trade_arg, ulong magic_number_arg) |
| Updates the attributes of the request. | |
| string | GetPrivateAtr (ENUM_PRIVATE_ATR_STRING atr) |
| Gets the private string attribute. | |
| double | GetPrivateAtr (ENUM_PRIVATE_ATR_DOUBLE atr) |
| Gets the private double attribute. | |
| ulong | GetPrivateAtr (ENUM_PRIVATE_ATR_ULONG atr) |
| Gets the private ulong attribute. | |
| void | BuildCheckPosition (MqlTradeRequest &request, ENUM_POSITION_TYPE type, ENUM_ORDER_TYPE_FILLING filling) |
| Builds a check position. | |
| void | BuildPosition (MqlTradeRequest &request, ENUM_POSITION_TYPE type, ENUM_ORDER_TYPE_FILLING filling) |
| Builds a position. | |
| void | BuildPending (MqlTradeRequest &request, ENUM_ORDER_PENDING_TYPE type, ENUM_ORDER_TYPE_FILLING filling, double price) |
| Builds a pending order. | |
| void | BuildPendingOrPosition (MqlTradeRequest &request, ENUM_ORDER_PENDING_TYPE type, ENUM_ORDER_TYPE_FILLING filling, double price) |
| Builds a pending order or position. | |
Public Attributes | |
| string | symbol |
| double | lotSize |
| ulong | takeProfit |
| ulong | stopLoss |
| ulong | deviationTrade |
| ulong | magicNumber |
| RoundVolume | roundVolume |
| CalcStop | calcStop |
Class to handle trade requests.
Enum for private double attributes.
Enum for private string attributes.
Enum for private ulong attributes.
|
inline |
Default constructor for the Request class.
| void Request::BuildCheckPosition | ( | MqlTradeRequest & | request, |
| ENUM_POSITION_TYPE | type, | ||
| ENUM_ORDER_TYPE_FILLING | filling ) |
Builds a check position.
| request | Trade request structure. |
| type | Position type. |
| filling | Order filling type. |
Here is the call graph for this function:
Here is the caller graph for this function:| void Request::BuildPending | ( | MqlTradeRequest & | request, |
| ENUM_ORDER_PENDING_TYPE | type, | ||
| ENUM_ORDER_TYPE_FILLING | filling, | ||
| double | price ) |
Builds a pending order.
| request | Trade request structure. |
| type | Pending order type. |
| filling | Order filling type. |
| price | Price for the pending order. |
Here is the call graph for this function:
Here is the caller graph for this function:| void Request::BuildPendingOrPosition | ( | MqlTradeRequest & | request, |
| ENUM_ORDER_PENDING_TYPE | type, | ||
| ENUM_ORDER_TYPE_FILLING | filling, | ||
| double | price ) |
Builds a pending order or position.
| request | Trade request structure. |
| type | Pending order type. |
| filling | Order filling type. |
| price | Price for the pending order. |
Here is the call graph for this function:
Here is the caller graph for this function:| void Request::BuildPosition | ( | MqlTradeRequest & | request, |
| ENUM_POSITION_TYPE | type, | ||
| ENUM_ORDER_TYPE_FILLING | filling ) |
Builds a position.
| request | Trade request structure. |
| type | Position type. |
| filling | Order filling type. |
Here is the call graph for this function:
Here is the caller graph for this function:| double Request::GetPrivateAtr | ( | ENUM_PRIVATE_ATR_DOUBLE | atr | ) |
Gets the private double attribute.
| atr | Attribute to get. |
| string Request::GetPrivateAtr | ( | ENUM_PRIVATE_ATR_STRING | atr | ) |
Gets the private string attribute.
| atr | Attribute to get. |
| ulong Request::GetPrivateAtr | ( | ENUM_PRIVATE_ATR_ULONG | atr | ) |
Gets the private ulong attribute.
| atr | Attribute to get. |
| void Request::UpdateAtr | ( | string | symbol_arg, |
| double | lot_size_arg, | ||
| uint | take_profit_arg, | ||
| uint | stop_loss_arg, | ||
| uint | deviation_trade_arg, | ||
| ulong | magic_number_arg ) |
Updates the attributes of the request.
| symbol_arg | Symbol of the asset. |
| lot_size_arg | Lot size. |
| take_profit_arg | Take profit value. |
| stop_loss_arg | Stop loss value. |
| deviation_trade_arg | Deviation trade value. |
| magic_number_arg | Magic number for the order. |
Here is the call graph for this function:| ulong Request::deviationTrade |
| double Request::lotSize |
Lot size for the order
| ulong Request::magicNumber |
Various parameters for the order
| RoundVolume Request::roundVolume |
Instance of RoundVolume class
| ulong Request::stopLoss |
| string Request::symbol |
Symbol of the asset
| ulong Request::takeProfit |