Downloading...
OPEN-SOURCE SCRIPT

Recent Pullback Percentage

58
//version=5
indicator("Recent Pullback Percentage", shorttitle="Pullback %", format=format.percent)

// 定義回顧期間
lookbackPeriod = input.int(60, title="Lookback Period")

// 找到近期最高價
highestHigh = ta.highest(high, lookbackPeriod)

// 計算回檔百分比
pullbackPercent = ((close - highestHigh) / highestHigh)

plot(pullbackPercent, title="Pullback Percentage")

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.