hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/EXIST.h

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

/*
* EXIST.h
*
* Copyright (c) 2019 hikyuu.org
*
* Created on: 2019-4-19
* Author: fasiondog
*/
#ifndef INDICATOR_CRT_EXIST_H_
#define INDICATOR_CRT_EXIST_H_
#include "../Indicator.h"
namespace hku {
/**
* 存在
* @details
* <pre>
* 用法EXIST(X,N) 表示条件X在N周期有存在
* 例如EXIST(C>O,10) 表示前10日内存在着阳线
* </pre>
* @ingroup Indicator
*/
Indicator HKU_API EXIST(int n = 20);
Indicator EXIST(const Indicator& ind, int n = 20);
inline Indicator EXIST(const Indicator& ind, int n) {
return EXIST(n)(ind);
}
} /* namespace */
#endif /* INDICATOR_CRT_EXIST_H_ */