OPEN-SOURCE SCRIPT

Candle Prediction

//version=5
indicator("Candle Prediction", overlay=true)

// تنظیمات اندیکاتورها
lengthRSI = input(14, title="RSI Length")
lengthEMA = input(9, title="EMA Length")

// محاسبه اندیکاتورها
rsi = ta.rsi(close, lengthRSI)
ema = ta.ema(close, lengthEMA)

// شرایط پیش‌بینی کندل بعدی
bullishSignal = close > ema and rsi < 30
bearishSignal = close < ema and rsi > 70

// رسم سیگنال‌ها روی چارت
plotshape(bullishSignal, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Bullish Signal", text="Bullish")
plotshape(bearishSignal, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Bearish Signal", text="Bearish")
Candlestick analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer