如何检查大于当前时间范围的一个时间范围内的移动平均线
我想检查 pine 脚本中大于当前图表时间范围的一个时间范围内的移动平均线 例如,如果图表在 m15 上,我想检查 m30 上的移动平均线,如果图表在 h1 上,则检查 h2 等等 它以某种方式自动获取当前图表时间范围并绘制大 1 个时间范围的 ma
I want to check moving averages on one time frame greater than the current chart time frame in pine script
For example if chart is on m15 I want to check moving averages on m30 if chart is on h1 it check on h2 and so on
Somehow it get current chart time frame automatically and plot ma for 1 time frame greater
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
security() 函数就是您所需要的正在寻找。
编辑
没有下一个上限时间范围。时间范围可以是任何东西。 Tradingview 列出的是一些方便的值。
例如,您可以获取当前时间范围(以分钟为单位),并从
2 * 当前时间范围
请求数据。The security() function is what you are looking for.
Edit
There is no next upper timeframe. Timeframe can be anything. What Tradingview lists are some convenient values.
You can get the current timeframe in minutes, and request data from
2 * current timeframe
for example.