hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/REVERSE.h
2019-11-10 23:31:41 +08:00

37 lines
606 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.

/*
* REVERSE.h
*
* Copyright (c) 2019 hikyuu.org
*
* Created on: 2019-5-1
* Author: fasiondog
*/
#pragma once
#ifndef INDICATOR_CRT_REVERSE_H_
#define INDICATOR_CRT_REVERSE_H_
#include "CVAL.h"
namespace hku {
/**
* 求相反数REVERSE(X)返回-X
* @ingroup Indicator
*/
Indicator HKU_API REVERSE();
Indicator REVERSE(price_t);
Indicator REVERSE(const Indicator& ind);
inline Indicator REVERSE(const Indicator& ind) {
return REVERSE()(ind);
}
inline Indicator REVERSE(price_t val) {
return REVERSE(CVAL(val));
}
} // namespace hku
#endif /* INDICATOR_CRT_REVERSE_H_ */