简体   繁体   中英

How to check a range of candles on chart?

I want to check close parameter of previous 50 candles.

I should find the minimum/maximum of the range, and it must be lower/upper than current bar close.

How should I specify the range? I'm a newbie to Pine Script. Appreciate that.

您也可以使用range()内置函数在一个语句中完成此操作。

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

closeRange = highestClose - lowestClose

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM