hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/COST.h
2021-12-11 00:49:27 +08:00

35 lines
766 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.

/*
* COST.h
*
* Copyright (c) 2019, hikyuu.org
*
* Created on: 2019-5-19
* Author: fasiondog
*/
#pragma once
#ifndef INDICATOR_CRT_COST_H_
#define INDICATOR_CRT_COST_H_
#include "KDATA.h"
namespace hku {
/**
* 成本分布
* @details
* <pre>
* 用法COST(k, X) 表示X%获利盘的价格是多少
* 例如COST(k, 10),表示10%获利盘的价格是多少即有10%的持仓量在该价格以下,
* 其余90%在该价格以上,为套牢盘 该函数仅对日线分析周期有效
* </pre>
* @param k 关联的K线数据
* @param x X%获利盘
* @ingroup Indicator
*/
Indicator HKU_API COST(const KData& k, double x = 10.0);
Indicator HKU_API COST(double x = 10.0);
} // namespace hku
#endif /* INDICATOR_CRT_COST_H_ */