如何检查图表上的一系列蜡烛?

How to check a range of candles on chart?

我想检查前 50 根蜡烛的 close 参数。

我应该找到范围的 minimum/maximum,它必须比当前收盘价 lower/upper。

我应该如何指定范围?我是 Pine Script 的新手。对此表示赞赏。

highestClose = highest(close, 50)
lowestClose = lowest(close, 50)

closeRange = highestClose - lowestClose

您也可以使用 range() 内置函数在一条语句中执行此操作。

closeRange = range(close, 50)