OPEN-SOURCE SCRIPT

Reversal Scanner (3 Candles)

//version=5
indicator("Parabolic Move & Reversal Scanner (3 Candles)", overlay=true)

// Inputs
bbLength = input.int(20, title="Bollinger Band Length")
bbMult = input.float(2.0, title="Bollinger Band Multiplier")

// Bollinger Bands Calculation
basis = ta.sma(close, bbLength)
dev = ta.stdev(close, bbLength)
upperBB = basis + bbMult * dev
lowerBB = basis - bbMult * dev

// Candle Type Detection
isDoji = math.abs(close - open) <= (high - low) * 0.1 // Small body (10% of total range)
isShootingStar = (high - math.max(open, close)) >= (high - low) * 0.6 and (math.min(open, close) - low) <= (high - low) * 0.2 // Long upper wick, small lower wick

// Conditions for Parabolic Move
parabolicMove1 = close > upperBB
parabolicMove2 = close[1] > upperBB
parabolicMove3 = close[2] > upperBB
threeParabolicCandles = parabolicMove1 and parabolicMove2 and parabolicMove3

// Reversal Candle Detection
reversalCandle = (isDoji or isShootingStar) and close > upperBB // Doji or Shooting Star near upper BB

// Final Signal
signal = threeParabolicCandles and reversalCandle

// Plot Signal on Chart
plotshape(signal, title="Reversal Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="Reversal")

// Alerts
if signal
alert("Reversal Signal: 3 parabolic candles followed by a Doji or Shooting Star near the upper Bollinger Band.", alert.freq_once_per_bar_close)
educational

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明