|
Library for MQL5 (MetaTrader) with support for Spark
|
Simulation of orders with attached data for research.
Public Member Functions | |
| COrderData () | |
| ~COrderData () | |
| bool | order (string symbol, ENUM_TIMEFRAMES period, int variant, bool sell, double openprice, datetime opentime, int takeprofit, int stoploss, int maxbars=0, int deviation=5, COrderDataObject *order=NULL) |
| Adds a processing order. More... | |
| void | tick (bool now=false) |
| Processes the added orders at the beginning of each day. More... | |
| int | findBar (COrderDataObject *order, double &profit, ENUM_TIMEFRAMES period, MqlRates &rates[], const int bars) |
Public Attributes | |
| bool | enable |
| bool | visual |
| COrderDataObject * | orders_first |
| COrderDataObject * | orders_last |
| CStatistic | statistic |
Protected Member Functions | |
| virtual bool | deleteOrder (COrderDataObject *order, const bool show, const bool stats) |
Protected Attributes | |
| int | lastday |
| MqlRates | rt [] |
| MqlRates | rtmin [] |
| COrderData::COrderData | ( | ) |
| COrderData::~COrderData | ( | ) |
|
protectedvirtual |
Reimplemented in COrderSql.
| int COrderData::findBar | ( | COrderDataObject * | order, |
| double & | profit, | ||
| ENUM_TIMEFRAMES | period, | ||
| MqlRates & | rates[], | ||
| const int | bars | ||
| ) |
| [in] | order | |
| [out] | profit | +take or -stop points |
| [in] | period | |
| [in] | rates | |
| [in] | bars |
| bool COrderData::order | ( | string | symbol, |
| ENUM_TIMEFRAMES | period, | ||
| int | variant, | ||
| bool | sell, | ||
| double | openprice, | ||
| datetime | opentime, | ||
| int | takeprofit, | ||
| int | stoploss, | ||
| int | maxbars = 0, |
||
| int | deviation = 5, |
||
| COrderDataObject * | order = NULL |
||
| ) |
Adds a processing order.
For best performance, you need to use one copy of the class for one pair (Symbol + Period).
| void COrderData::tick | ( | bool | now = false | ) |
Processes the added orders at the beginning of each day.
| now | start processing immediately |
BUG: не учитываются разные символы, периоды
| bool COrderData::enable |
|
protected |
| COrderDataObject* COrderData::orders_first |
| COrderDataObject * COrderData::orders_last |
|
protected |
|
protected |
| CStatistic COrderData::statistic |
| bool COrderData::visual |