pine-script - Is it possible to retrieve the current bar's color?
问题描述
I'd like a quick way to determine if the current bar is bullish or bearish. I can only find the barColor() function which sets the bar color; I'd like to read it.
解决方案
您的脚本无法查看条形的实际颜色,但它知道价格信息,因此可以使用如下布尔表达式导出蜡烛的状态:
upBar = close > open
推荐阅读
- sql - 从 Excel VBA 连接到 Azure 的连接丢失
- swift - 为什么 WKWebView 无法从 Firebase 打开 .doc?
- multiple-columns - 在 Tableau 中自动隐藏列
- javascript - 仅当圆圈具有关联的注释时才在折线图中附加圆圈
- vue.js - WebRTC 对等连接错误
- android - Android:我的服务未显示在开发人员选项->“正在运行的服务”中
- x11 - 来自窗口管理器的屏幕截图
- python - Pytorch拼写检查字符RNN不输出结束标记
- java - 如何在 Java 中加载没有 Spark 或 PMML 的决策树模型
- reactjs - 在 Material-UI CardMedia 中显示加载器