简体   繁体   English

松脚本功能说明

[英]Pine script function clarification

I'm new to pine script and need community help to understand below function, for example passing function returned value again to function as a series[float] ,我是 pine 脚本的新手,需要社区帮助来理解下面的函数,例如再次传递函数返回值以作为series[float]函数,

momentum(seria, length) =>
    mom = seria - seria[length]
    mom

mom0 = momentum(close, 12)
mom1 = momentum( mom0, 1)
  1. mom0 is float or series[float] ? mom0float还是series[float]
  2. If mom0 is series[float] how?如果mom0series[float]怎么办? and what kind of data it series[float] contains?series[float]包含什么样的数据?

Thanks谢谢

mom0 is of type series float . mom0series float类型。 Once a series , always a series .一次是一个series ,永远是一个series

mom0 is the momentum based on close price. mom0是基于close价的动量。 mom1 is the same but it uses mom0 as its source. mom1是相同的,但它使用mom0作为其源。

mom1 is basically mom0 - mom0[1] because length = 1 . mom1基本上是mom0 - mom0[1]因为length = 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM