量化交易軟件:赫茲量化系統(tǒng)市場深度集合并操控
我們已擁有了操控任何品種 DOM 的功能 — 在之前的文章中,我已創(chuàng)建了 DOM 抽象訂單對象及其衍生類,DOM 快照類和 DOM 快照序列類。 如今,只剩下為 DOM 快照序列對象創(chuàng)建一個通用存儲 — 快照序列集合類,它能存儲所有這些序列,并可便利地訪問存儲在集合列表中的任意 DOM 快照,并支持指定序列尺寸的自動更新(添加新快照,和刪除舊快照)。
除了創(chuàng)建 DOM 快照序列集合類之外,我還將啟動新的函數(shù)庫部分 — 其他庫類。 我將從操控 MQL5.com 信號服務(wù)的功能開始,即,我將創(chuàng)建信號對象類來存儲 MQL5.com 信號服務(wù)廣播里單個信號的所有數(shù)據(jù)。
改進庫類
我們現(xiàn)將新消息添加到函數(shù)庫當(dāng)中。 在 \MQL5\Include\DoEasy\Data.mqh 里,加入新的消息索引:
//--- CMBookSeries ? MSG_MBOOK_SERIES_TEXT_MBOOKSERIES, ? ? ? ? ? ? ? ? // DOM snapshot series ? MSG_MBOOK_SERIES_ERR_ADD_TO_LIST, ? ? ? ? ? ? ? ? ?// Error. Failed to add DOM snapshot series to the list ? //--- CMBookSeriesCollection ? MSG_MB_COLLECTION_TEXT_MBCOLLECTION, ? ? ? ? ? ? ? // DOM snapshot series collection //--- CMQLSignal ? MSG_SIGNAL_MQL5_TEXT_SIGNAL, ? ? ? ? ? ? ? ? ? ? ? // Signal ? MSG_SIGNAL_MQL5_TEXT_SIGNAL_MQL5, ? ? ? ? ? ? ? ? ?// MQL5.com Signals service signal ? MSG_SIGNAL_MQL5_TRADE_MODE, ? ? ? ? ? ? ? ? ? ? ? ?// Account type ? MSG_SIGNAL_MQL5_DATE_PUBLISHED, ? ? ? ? ? ? ? ? ? ?// Publication date ? MSG_SIGNAL_MQL5_DATE_STARTED, ? ? ? ? ? ? ? ? ? ? ?// Monitoring start date ? MSG_SIGNAL_MQL5_DATE_UPDATED, ? ? ? ? ? ? ? ? ? ? ?// Date of the latest update of the trading statistics ? MSG_SIGNAL_MQL5_ID, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// ID ? MSG_SIGNAL_MQL5_LEVERAGE, ? ? ? ? ? ? ? ? ? ? ? ? ?// Trading account leverage ? MSG_SIGNAL_MQL5_PIPS, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Trading result in pips ? MSG_SIGNAL_MQL5_RATING, ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Position in the signal rating ? MSG_SIGNAL_MQL5_SUBSCRIBERS, ? ? ? ? ? ? ? ? ? ? ? // Number of subscribers ? MSG_SIGNAL_MQL5_TRADES, ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Number of trades ? MSG_SIGNAL_MQL5_SUBSCRIPTION_STATUS, ? ? ? ? ? ? ? // Status of account subscription to a signal ? ? MSG_SIGNAL_MQL5_EQUITY, ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Account equity ? MSG_SIGNAL_MQL5_GAIN, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Account growth in % ? MSG_SIGNAL_MQL5_MAX_DRAWDOWN, ? ? ? ? ? ? ? ? ? ? ?// Maximum drawdown ? MSG_SIGNAL_MQL5_PRICE, ? ? ? ? ? ? ? ? ? ? ? ? ? ? // Signal subscription price ? MSG_SIGNAL_MQL5_ROI, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // Signal ROI (Return on Investment) in % ? MSG_SIGNAL_MQL5_AUTHOR_LOGIN, ? ? ? ? ? ? ? ? ? ? ?// Author login ? MSG_SIGNAL_MQL5_BROKER, ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Broker (company) name ? MSG_SIGNAL_MQL5_BROKER_SERVER, ? ? ? ? ? ? ? ? ? ? // Broker server ? MSG_SIGNAL_MQL5_NAME, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Name ? MSG_SIGNAL_MQL5_CURRENCY, ? ? ? ? ? ? ? ? ? ? ? ? ?// Account currency ? ? MSG_SIGNAL_MQL5_TEXT_GAIN, ? ? ? ? ? ? ? ? ? ? ? ? // Growth ? MSG_SIGNAL_MQL5_TEXT_DRAWDOWN, ? ? ? ? ? ? ? ? ? ? // Drawdown ? ?}; //+------------------------------------------------------------------+