|
Library for MQL5 (MetaTrader) with support for Spark
|
Record data of simulated orders (COrderData) in a file format MySQL.
Public Member Functions | |
| COrderSql () | |
| ~COrderSql () | |
| bool | order (string symbol, ENUM_TIMEFRAMES period, int variant, bool sell, double openprice, datetime opentime, int takeprofit, int stoploss, CSqlObject *sqlobject, int maxbars=0, bool snapshot=true, int deviation=5) |
| Adds a processing order. More... | |
Public Member Functions inherited from COrderData | |
| 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 | |
| CSqlFile | sqlfile |
Public Attributes inherited from COrderData | |
| 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 | |
| bool | firstrecord |
Protected Attributes inherited from COrderData | |
| int | lastday |
| MqlRates | rt [] |
| MqlRates | rtmin [] |
| COrderSql::COrderSql | ( | ) |
| COrderSql::~COrderSql | ( | ) |
|
protectedvirtual |
Reimplemented from COrderData.
| bool COrderSql::order | ( | string | symbol, |
| ENUM_TIMEFRAMES | period, | ||
| int | variant, | ||
| bool | sell, | ||
| double | openprice, | ||
| datetime | opentime, | ||
| int | takeprofit, | ||
| int | stoploss, | ||
| CSqlObject * | sqlobject, | ||
| int | maxbars = 0, |
||
| bool | snapshot = true, |
||
| int | deviation = 5 |
||
| ) |
Adds a processing order.
For best performance, you need to use one copy of the class for one pair (Symbol + Period).
| snapshot | use the CSqlObjectSnapShot to save current data |
|
protected |
| CSqlFile COrderSql::sqlfile |