mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-05 05:17:47 +08:00
31 lines
491 B
C++
31 lines
491 B
C++
/*
|
|
* ROC.h
|
|
*
|
|
* Copyright (c) 2019, hikyuu.org
|
|
*
|
|
* Created on: 2019-5-18
|
|
* Author: fasiondog
|
|
*/
|
|
|
|
#ifndef INDICATOR_CRT_ROC_H_
|
|
#define INDICATOR_CRT_ROC_H_
|
|
|
|
#include "../Indicator.h"
|
|
|
|
namespace hku {
|
|
|
|
/**
|
|
* 变动率指标 ((price / prevPrice)-1)*100
|
|
* @ingroup Indicator
|
|
*/
|
|
Indicator HKU_API ROC(int n =10);
|
|
Indicator ROC(const Indicator& ind, int n = 10);
|
|
|
|
inline Indicator ROC(const Indicator& ind, int n) {
|
|
return ROC(n)(ind);
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* INDICATOR_CRT_ROC_H_ */
|