PROTECTED SOURCE SCRIPT

布林带收缩起爆点 - 副图

13
根据布林格的思想,画的指标,supernblength = input.int(20, "布林带周期", minval=1)
mult = input.float(2.0, "标准差倍数", step=0.1, minval=0.5, maxval=5)
src = input(close, "价格源")

// 计算布林带
basis = ta.sma(src, length)
dev = mult * ta.stdev(src, length)
upper = basis + dev
lower = basis - dev

// 计算布林带宽度 (百分比)
bandWidth = (upper - lower) / basis * 100

// 动态阈值计算
lookback = input.int(50, "收缩检测周期", minval=10)
squeezeThreshold = ta.lowest(bandWidth, lookback) * 1.2
isSqueeze = bandWidth < squeezeThreshold

// 动量确认
rsiLength = input.int(14, "RSI周期")
rsiValue = ta.rsi(src, rsiLength)
volAvg = ta.sma(volume, 20)
volSpike = volume > volAvg * 1.8

// 起爆点条件
breakoutCondition =
isSqueeze[1] and
not isSqueeze and
rsiValue > 50 and
volSpike and
close > close[1]

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.