hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/HHVBARS.h
2019-04-11 23:30:51 +08:00

36 lines
766 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.

/*
* HHVBARS.h
*
* Copyright (c) 2019 hikyuu.org
*
* Created on: 2019-4-11
* Author: fasiondog
*/
#ifndef INDICATOR_CRT_HHVBARS_H_
#define INDICATOR_CRT_HHVBARS_H_
#include "../Indicator.h"
namespace hku {
/**
* 上一高点位置 求上一高点到当前的周期数。
* @details
* <pre>
* 用法HHVBARS(X,N):求N周期内X最高值到当前周期数N=0表示从第一个有效值开始统计
* 例如HHVBARS(HIGH,0)求得历史新高到到当前的周期数
* </pre>
* @ingroup Indicator
*/
Indicator HKU_API HHVBARS(int n = 20);
Indicator HHVBARS(const Indicator& ind, int n = 20);
inline Indicator HHVBARS(const Indicator& ind, int n) {
return HHVBARS(n)(ind);
}
} /* namespace */
#endif /* INDICATOR_CRT_HHVBARS_H_ */