Hikyuu
TwoLineEnvironment.h
浏览该文件的文档.
1 /*
2  * TwoLineEnviroment.h
3  *
4  * Created on: 2016年5月17日
5  * Author: Administrator
6  */
7 
8 #ifndef TRADE_SYS_ENVIRONMENT_IMP_TWOLINEENVIRONMENT_H_
9 #define TRADE_SYS_ENVIRONMENT_IMP_TWOLINEENVIRONMENT_H_
10 
11 #include "../../../indicator/Operand.h"
12 #include "../EnvironmentBase.h"
13 
14 namespace hku {
15 
17 public:
19  TwoLineEnvironment(const Operand& fast, const Operand& slow);
20  virtual ~TwoLineEnvironment();
21 
22  virtual void _calculate();
23  virtual EnvironmentPtr _clone();
24 
25 private:
26  Operand m_fast;
27  Operand m_slow;
28 
29 //============================================
30 // 序列化支持
31 //============================================
32 #if HKU_SUPPORT_SERIALIZATION
34  template<class Archive>
35  void serialize(Archive & ar, const unsigned int version) {
36  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(EnvironmentBase);
37  ar & BOOST_SERIALIZATION_NVP(m_fast);
38  ar & BOOST_SERIALIZATION_NVP(m_slow);
39  }
40 #endif
41 };
42 
43 } /* namespace hku */
44 
45 #endif /* TRADE_SYS_ENVIRONMENT_IMP_TWOLINEENVIRONMENT_H_ */
friend class boost::serialization::access
Definition: TwoLineEnvironment.h:33
Definition: Operand.h:15
virtual void _calculate()
子类计算接口
Definition: TwoLineEnvironment.cpp:35
virtual EnvironmentPtr _clone()
子类克隆接口
Definition: TwoLineEnvironment.cpp:28
TwoLineEnvironment()
Definition: TwoLineEnvironment.cpp:14
环境判定策略基类
Definition: EnvironmentBase.h:32
Definition: TwoLineEnvironment.h:16
virtual ~TwoLineEnvironment()
Definition: TwoLineEnvironment.cpp:24
Hikyuu核心命名空间,包含股票数据的管理、指标实现、交易系统框架等
Definition: Block.cpp:11
shared_ptr< EnvironmentBase > EnvironmentPtr
Definition: EnvironmentBase.h:61