mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-05 05:17:47 +08:00
41 lines
789 B
C++
41 lines
789 B
C++
/*
|
||
* BARSSINCE.h
|
||
*
|
||
* Copyright (c) 2019 hikyuu.org
|
||
*
|
||
* Created on: 2019-5-4
|
||
* Author: fasiondog
|
||
*/
|
||
|
||
#ifndef INDICATOR_CRT_BARSSINCE_H_
|
||
#define INDICATOR_CRT_BARSSINCE_H_
|
||
|
||
#include "CVAL.h"
|
||
|
||
namespace hku {
|
||
|
||
/**
|
||
* 第一个条件成立位置到当前的周期数。
|
||
* @details
|
||
* <pre>
|
||
* 用法:BARSSINCE(X):第一次X不为0到现在的天数。
|
||
* 例如:BARSSINCE(HIGH>10)表示股价超过10元时到当前的周期数
|
||
* </pre>
|
||
* @ingroup Indicator
|
||
*/
|
||
Indicator HKU_API BARSSINCE();
|
||
Indicator BARSSINCE(price_t);
|
||
Indicator BARSSINCE(const Indicator& ind);
|
||
|
||
inline Indicator BARSSINCE(const Indicator& ind) {
|
||
return BARSSINCE()(ind);
|
||
}
|
||
|
||
inline Indicator BARSSINCE(price_t val) {
|
||
return BARSSINCE(CVAL(val));
|
||
}
|
||
|
||
}
|
||
|
||
#endif /* INDICATOR_CRT_BARSSINCE_H_ */
|