Hikyuu
CrossGoldSignal.h
浏览该文件的文档.
1 /*
2  * CrossGoldSignal.h
3  *
4  * Created on: 2017年6月13日
5  * Author: fasiondog
6  */
7 
8 #ifndef TRADE_SYS_SIGNAL_IMP_CROSSGOLDSIGNAL_H_
9 #define TRADE_SYS_SIGNAL_IMP_CROSSGOLDSIGNAL_H_
10 
11 #include "../../../indicator/Operand.h"
12 #include "../SignalBase.h"
13 
14 namespace hku {
15 
16 class CrossGoldSignal: public SignalBase {
17 public:
19  CrossGoldSignal(const Operand& fast, const Operand& slow, const string& kpart);
20  virtual ~CrossGoldSignal();
21 
22  virtual SignalPtr _clone();
23  virtual void _calculate();
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(SignalBase); \
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_SIGNAL_IMP_CROSSGOLDSIGNAL_H_ */
virtual void _calculate()
子类计算接口,在setTO中调用
Definition: CrossGoldSignal.cpp:37
Definition: Operand.h:15
CrossGoldSignal()
Definition: CrossGoldSignal.cpp:13
Definition: CrossGoldSignal.h:16
friend class boost::serialization::access
Definition: CrossGoldSignal.h:33
信号指示器基类
Definition: SignalBase.h:30
virtual ~CrossGoldSignal()
Definition: CrossGoldSignal.cpp:26
virtual SignalPtr _clone()
子类克隆接口
Definition: CrossGoldSignal.cpp:30
shared_ptr< SignalBase > SignalPtr
Definition: SignalBase.h:85
Hikyuu核心命名空间,包含股票数据的管理、指标实现、交易系统框架等
Definition: Block.cpp:11