OPEN-SOURCE SCRIPT

AI Signals: Blue-Chip Dip Scanner

105
//version=5
indicator("AI Signals: Blue-Chip Dip Scanner", overlay=true)

//-------------------------//
// SETTINGS //
//-------------------------//
lengthRSI = input.int(14, "RSI Length")
rsiOversold = input.int(30, "RSI Oversold")
rsiOverbought = input.int(70, "RSI Overbought")

//-------------------------//
// CALCULATIONS //
//-------------------------//
rsi = ta.rsi(close, lengthRSI)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)

//-------------------------//
// CONDITIONS //
//-------------------------//
dip = ta.crossunder(close, ema50) and rsi < rsiOversold

//-------------------------//
// SIGNALS //
//-------------------------//
buySignal = dip

plotshape(buySignal, title="Buy Dip", style=shape.labelup,
color=color.green, text="BUY", size=size.small, location=location.belowbar)

//-------------------------//
// ALERTS //
//-------------------------//
alert_msg = '{"symbol":"{{ticker}}","price":"{{close}}"}'
alertcondition(buySignal, title="AI Buy Dip Signal", message=alert_msg)

Penafian

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.