0

例如,我有一个固定蜡烛(bar_index = 6900)

我的问题是,是否有可能通过这个 bar_index 获得该蜡烛的蜡烛信息(低位和高位)?

4

1 回答 1

0

如果我理解正确,您只需从bar_index.

//@version=5
indicator("My Script", overlay=true)
target_bar_index = 10
n = bar_index < target_bar_index ? na : bar_index - target_bar_index
plot(bar_index < target_bar_index ? na : high[n], color=color.green, style=plot.style_circles)
plot(bar_index < target_bar_index ? na : low[n], color=color.red, style=plot.style_circles)

在此处输入图像描述

于 2021-12-05T18:43:24.510 回答