hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/SQRT.h
2019-11-10 23:31:41 +08:00

42 lines
662 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.

/*
* SQRT.h
*
* Copyright (c) 2019 hikyuu.org
*
* Created on: 2019-4-14
* Author: fasiondog
*/
#pragma once
#ifndef INDICATOR_CRT_SQRT_H_
#define INDICATOR_CRT_SQRT_H_
#include "CVAL.h"
namespace hku {
/**
* 开平方
* @details
* <pre>
* 用法SQRT(X)为X的平方根
* 例如SQRT(CLOSE)收盘价的平方根
* </pre>
* @ingroup Indicator
*/
Indicator HKU_API SQRT();
Indicator SQRT(price_t);
Indicator SQRT(const Indicator& ind);
inline Indicator SQRT(const Indicator& ind) {
return SQRT()(ind);
}
inline Indicator SQRT(price_t val) {
return SQRT(CVAL(val));
}
} // namespace hku
#endif /* INDICATOR_CRT_SQRT_H_ */