如何从 CCI 复制 Pinescript 结果?

How to replicate Pinescript results from CCI?

我正在尝试理解 CCI 脚本,但我没有看到它使用“高”和“低”值来计算商品通道指数 (CCI) 公式中解释的典型价格,是吗?

来自文档:

The CCI (commodity channel index) is calculated as the difference between the typical price of a commodity and its simple moving average, divided by the mean absolute deviation of the typical price. The index is scaled by an inverse factor of 0.015 to provide more readable numbers

“高”和“低”值不用于计算CCI。 我假设您混淆了术语 typical pricetrue range.

[增加]

pine 脚本允许您选择要执行的一系列计算。根据您的情况选择 HLС3