chandeMomentumOscillator() 函数
chandeMomentumOscillator()
将 Tushar Chande 开发的技术动量指标应用于输入数据。
Chande 动量震荡指标 (CMO) 执行以下操作
- 确定每个输入表的中值,并计算值大于中值的行的总和与值小于中值的行的总和之间的差值。
- 将步骤 1 的结果除以给定时间段内所有数据移动的总和。
- 将步骤 2 的结果乘以 100,并返回介于 -100 和 +100 之间的值。
输出表
对于每个具有 x
行的输入表,chandeMomentumOscillator()
输出一个具有 x - n
行的表。
函数类型签名
(<-tables: stream[A], n: int, ?columns: [string]) => stream[B] where A: Record, B: Record
有关更多信息,请参阅 函数类型签名。
参数
n
(必需) 计算中使用的周期或点数。
columns
要操作的列的列表。默认为 ["_value"]
。
tables
输入数据。默认为管道转发数据 (<-
)。
示例
将 Chande 动量震荡指标应用于输入数据
import "sampledata"
sampledata.int()
|> chandeMomentumOscillator(n: 2)
此页面是否对您有帮助?
感谢您的反馈!