hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/ABS.h
2019-04-11 02:10:41 +08:00

34 lines
489 B
C++

/*
* ABS.h
*
* Created on: 2019-4-2
* Author: fasiondog
*/
#ifndef INDICATOR_CRT_ABS_H_
#define INDICATOR_CRT_ABS_H_
#include "CVAL.h"
namespace hku {
/**
* 求绝对值
* @ingroup Indicator
*/
Indicator HKU_API ABS();
Indicator ABS(price_t);
Indicator ABS(const Indicator& ind);
inline Indicator ABS(const Indicator& ind) {
return ABS()(ind);
}
inline Indicator ABS(price_t val) {
return ABS(CVAL(val));
}
} /* namespace */
#endif /* INDICATOR_CRT_ABS_H_ */