-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathCalcAboveBelow.h
74 lines (61 loc) · 2.42 KB
/
CalcAboveBelow.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
/************************************************************************
* Copyright(c) 2011, One Unified. All rights reserved. *
* email: [email protected] *
* *
* 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
// From HDF5 file, calculates statistics for price range above open and below open
#include <string>
#include <map>
#include <TFTrading/ProviderInterface.h>
#include <TFTrading/Portfolio.h>
#include <TFTrading/Symbol.h>
#include <TFTrading/Instrument.h>
using namespace ou::tf;
class AboveBelowInstrument {
public:
AboveBelowInstrument( void ) {};
~AboveBelowInstrument( void ) {};
protected:
private:
};
class CAboveBelowUnderlying : public AboveBelowInstrument {
public:
CAboveBelowUnderlying( void ) {};
~CAboveBelowUnderlying( void ) {};
protected:
private:
};
class CAboveBelowOption : public AboveBelowInstrument {
public:
CAboveBelowOption( void ) {};
~CAboveBelowOption( void ) {};
protected:
private:
};
class CalcAboveBelow {
public:
CalcAboveBelow( Instrument::pInstrument_t pInstrument, ProviderInterfaceBase* pDataProvider, ProviderInterfaceBase* pExecutionProvider );
~CalcAboveBelow(void);
void Start( void );
void Stop( void );
protected:
// void HandleUpdatePortfolioRecord( CPortfolio::UpdatePortfolioRecord_t );
void HandleTrade( const ou::tf::Trade &trade );
private:
Instrument::pInstrument_t m_pInstrument;
ProviderInterfaceBase* m_pDataProvider;
ProviderInterfaceBase* m_pExecutionProvider;
//std::string m_sSymbolName;
double m_dblLast;
typedef std::map<std::string, AboveBelowInstrument*> map_instruments_t;
map_instruments_t m_mapInstruments;
};