hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/ROUNDDOWN.h
2019-04-15 00:58:41 +08:00

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

/*
* ROUNDDOWN.h
*
* Copyright (c) 2019 hikyuu.org
*
* Created on: 2019-4-14
* Author: fasiondog
*/
#ifndef INDICATOR_CRT_ROUNDDOWN_H_
#define INDICATOR_CRT_ROUNDDOWN_H_
#include "CVAL.h"
namespace hku {
/**
* 向上截取如10.1截取后为11
* @ingroup Indicator
*/
Indicator HKU_API ROUNDDOWN(int ndigits = 2);
Indicator ROUNDDOWN(price_t, int ndigits = 2);
Indicator ROUNDDOWN(const Indicator& ind, int ndigits = 2);
inline Indicator ROUNDDOWN(const Indicator& ind, int n) {
return ROUNDDOWN(n)(ind);
}
inline Indicator ROUNDDOWN(price_t val, int n) {
return ROUNDDOWN(CVAL(val), n);
}
} /* namespace */
#endif /* INDICATOR_CRT_ROUNDDOWN_H_ */