pine-script - 如何在 pine 脚本中获取特殊栏的编号
问题描述
我正在尝试获取 pine 脚本中的条数。例如,我想为每 24 个条找到最高条。我需要那个栏的数量而不是价值。我试过
Highest(high,24)
但它返回值!!!!
解决方案
//@version=4
study("")
hi = highest(high,24)
hiIndex = - highestbars(high, 24)
hiBarIndex = bar_index[hiIndex]
plot(hi, "hi")
plot(hiIndex, "hiIndex")
plot(hiBarIndex, "hiBarIndex")
推荐阅读
- azure - 如何从 devOps 管道访问 Azure 门户的配置?
- c# - 使用 ML.NET 从预测中获得准确性
- google-apps-script - appscript UrlFetchApp 和幻灯片导出到 txt
- python - 存在 python 2.7 时使用 python 3.8 创建虚拟环境
- react-native - Gradle 同步失败:基础:GRADLE_USER_HOME 未知
- mongodb - 猫鼬 findByIdAndUpdate 嵌套不更新对象
- python - 我应该如何在 Airflow 中创建 DAG 子计划?
- algorithm - 非递归编写的斐波那契算法的空间复杂度是多少?
- c++ - 如何从主窗口访问另一个 Windows ui?
- c# - 无法从根提供程序解析范围服务“Services.Contracts.IHandler`1[Services.ProcessFile]”