8 #ifndef INDICATOR_OPERANDNODE_H_ 9 #define INDICATOR_OPERANDNODE_H_ 42 void add(
OPType, OperandNodePtr left, OperandNodePtr right);
46 const string&
name()
const {
return m_name; }
47 void name(
const string& name) { m_name =
name; }
49 static string getOPTypeName(
OPType);
55 OperandNodePtr m_left;
56 OperandNodePtr m_right;
58 #if HKU_SUPPORT_SERIALIZATION 60 friend class boost::serialization::access;
61 template<
class Archive>
62 void serialize(Archive & ar,
const unsigned int version) {
63 ar & BOOST_SERIALIZATION_NVP(m_optype);
64 ar & BOOST_SERIALIZATION_NVP(m_ind);
65 ar & BOOST_SERIALIZATION_NVP(m_name);
66 ar & BOOST_SERIALIZATION_NVP(m_left);
67 ar & BOOST_SERIALIZATION_NVP(m_right);
大于
Definition: OperandNode.h:25
小于
Definition: OperandNode.h:26
叶子节点
Definition: OperandNode.h:18
OPType
Definition: OperandNode.h:17
减
Definition: OperandNode.h:21
小于等于
Definition: OperandNode.h:29
乘
Definition: OperandNode.h:22
const string & name() const
Definition: OperandNode.h:46
除
Definition: OperandNode.h:23
等于
Definition: OperandNode.h:24
指标类,具体由IndicatorImp实现,实现新指标时应继承IndicatorImp
Definition: Indicator.h:38
Definition: OperandNode.h:15
shared_ptr< OperandNode > OperandNodePtr
Definition: OperandNode.h:35
大于等于
Definition: OperandNode.h:28
#define HKU_API
Definition: DataType.h:12
Definition: OperandNode.h:19
shared_ptr< OperandNode > OperandNodePtr
Definition: OperandNode.h:72
不等于
Definition: OperandNode.h:27
或
Definition: OperandNode.h:31
void name(const string &name)
Definition: OperandNode.h:47
与
Definition: OperandNode.h:30
Hikyuu核心命名空间,包含股票数据的管理、指标实现、交易系统框架等
Definition: Block.cpp:11
OP(OP1,OP2) OP1->calcalue(OP2->calculate(ind))
Definition: OperandNode.h:20