-
Notifications
You must be signed in to change notification settings - Fork 153
/
SimulationSymbol.h
79 lines (58 loc) · 2.49 KB
/
SimulationSymbol.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/************************************************************************
* Copyright(c) 2009, One Unified. All rights reserved. *
* email: info@oneunified.net *
* *
* This file is provided as is WITHOUT ANY WARRANTY *
* without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* This software may not be used nor distributed without proper license *
* agreement. *
* *
* See the file LICENSE.txt for redistribution information. *
************************************************************************/
#pragma once
#include <string>
#include <TFTimeSeries/TimeSeries.h>
#include <TFTrading/Symbol.h>
namespace ou { // One Unified
namespace tf { // TradeFrame
class SimulationSymbol: public Symbol<SimulationSymbol> {
friend class SimulationProvider;
public:
using inherited_t = Symbol<SimulationSymbol>;
using pInstrument_t = inherited_t::pInstrument_t;
using pInstrument_cref = inherited_t::pInstrument_cref;
SimulationSymbol( const std::string& sSymbol
, pInstrument_cref pInstrument
, const std::string& sGroup
, const std::string& sFileName
); // base with trades/ quotes/, greeks/, depths/
virtual ~SimulationSymbol();
protected:
void StartQuoteWatch();
void StopQuoteWatch();
void StartTradeWatch();
void StopTradeWatch();
void StartGreekWatch();
void StopGreekWatch();
void StartDepthByMMWatch();
void StopDepthByMMWatch();
void StartDepthByOrderWatch();
void StopDepthByOrderWatch();
void HandleQuoteEvent( const DatedDatum &datum );
void HandleTradeEvent( const DatedDatum &datum );
void HandleGreekEvent( const DatedDatum &datum );
void HandleDepthByMMEvent( const DatedDatum &datum );
void HandleDepthByOrderEvent( const DatedDatum &datum );
private:
std::string m_sFileName;
std::string m_sDirectory;
Quotes m_quotes;
Trades m_trades;
DepthsByMM m_depths_mm;
DepthsByOrder m_depths_order;
Greeks m_greeks;
};
} // namespace tf
} // namespace ou