仅更改第七栏的颜色 - (特定的蜡烛颜色交易图)
我想改变一支蜡烛的颜色。例如,仅第七。
我尝试了barcolor和偏移量,但它也指出了以前的所有7个,您能帮我一个黄色的第7个吧吗?
//@version=5
indicator('Previous Candle High and Low', shorttitle='Prev. H/L', overlay=true)
dt = time - time[1]
patternLabelPosHigh = close[7]
barcolor(color=bar_index ? color.yellow : na, offset=-6)
谢谢 !
I would like to change the color of a single candle. For example only the 7th.
I tried with barcolor and offset but it also points out all the previous ones of 7, Can you help me to get only the 7th bar in yellow ?
//@version=5
indicator('Previous Candle High and Low', shorttitle='Prev. H/L', overlay=true)
dt = time - time[1]
patternLabelPosHigh = close[7]
barcolor(color=bar_index ? color.yellow : na, offset=-6)
Thank you !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想追溯仅绘制左侧的第七栏并重新绘制结果,则必须检查当前条的状态。
下面的结构看起来多余,但是就我测试而言,它涵盖了所有可能的市场状态,下面的脚本将不断向左画7个bar,并在每个新栏上重新绘制:
If you would like to retroactively paint only the 7th bar to the left and redraw the results, you have to check the current bar's state.
The construction below looks redundant, however it covers all possible states of the market as far as I tested, the script below will constantly paint 7th bar to the left and redraw on every new bar: