WeightedClosePrice

增量式、因果技术分析文档

摘要

WeightedClosePrice 以最高价、最低价和双倍收盘价计算加权收盘价。

更新 API

result = rtta.WeightedClosePrice().update(close, high, low)

update(...) 每次接收 closehighlow;只推进状态时可调用 advance(...)

工作原理

这是逐根 K 线的因果价格变换,收盘价权重为最高价或最低价的两倍。

递推公式

\[WCP_t=\frac{high_t+low_t+2close_t}{4}\]

实现说明

递推公式在 src/rtta/indicator.cppclass WeightedClosePrice 中实现。

参考资料