[英]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)
mom0
is float
or series[float]
? mom0
是float
还是series[float]
?mom0
is series[float]
how?mom0
是series[float]
怎么办? and what kind of data it series[float]
contains?series[float]
包含什么样的数据? Thanks谢谢
mom0
is of type series float
. mom0
是series 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.