简体   繁体   English

Timeframe="" 参数不包含第二个时间范围

[英]Timeframe ="" parameter not contain second time frame

Currently the parameter timeframe = "" of目前参数timeframe = ""的

Indicator(title , overlay , timeframe="")

doesn't include seconds time frame.不包括秒时间范围。 timeframe parameter only have minutes, hours, weeks and months time frames. timeframe 参数只有分钟、小时、周和月的时间范围。 But does not include seconds, 1 second, 2 seconds.但不包括秒、1秒、2秒。

How to add seconds to timeframe ="" parameter.如何在timeframe =""参数中添加秒数。 Or any other parameter we can change with timeframe ="", to add seconds.或者我们可以使用 timeframe="" 更改的任何其他参数,以添加秒数。

The default timeframes are limited.默认时间范围是有限的。

You can, however, use a user input to get any timeframe you want.但是,您可以使用用户输入来获取所需的任何时间范围。 Even, the ones that are not listed in that drop down menu.甚至,那些没有在那个下拉菜单中列出的。

The resolution argument allowable values are:分辨率参数允许的值为:

  • 1S, 5S, 10S, 15S, 30S - for seconds intervals (chart resolution should be less than or equal to the requested resolution) 1S、5S、10S、15S、30S - 以秒为间隔(图表分辨率应小于或等于请求的分辨率)
  • from 1 to 1440 for minutes从 1 到 1440 分钟
  • from 1D to 365D for days从 1D 到 365D 几天
  • from 1W to 52W for weeks从 1W 到 52W 持续数周
  • from 1M to 12M for months数月从 1M 到 12M

Then you need to use the security() function to get the value from different timeframes.然后您需要使用security() function 从不同的时间范围内获取值。

tf = input.string("5S", "Timeframe")
sma_val = ta.sma(close, 9)
sma_mtf = request.security(syminfo.tickerid, tf, sma_val)

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

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