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

37 lines
563 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* LN.h
*
* Created on: 2019-4-11
* Author: fasiondog
*/
#ifndef INDICATOR_CRT_LN_H_
#define INDICATOR_CRT_LN_H_
#include "CVAL.h"
namespace hku {
/**
* 求自然对数
* 用法LN(X)以e为底的对数
* 例如LN(CLOSE)求收盘价的对数
* @ingroup Indicator
*/
Indicator HKU_API LN();
Indicator LN(price_t);
Indicator LN(const Indicator& ind);
inline Indicator LN(const Indicator& ind) {
return LN()(ind);
}
inline Indicator LN(price_t val) {
return LN(CVAL(val));
}
} /* namespace */
#endif /* INDICATOR_CRT_LN_H_ */