AI Gold Digger
AI Gold Digger
// Functions
atr = ta.atr(atrLen)
prevLowerBand = nz(lowerBand[1])
prevUpperBand = nz(upperBand[1])
int direction = na
float superTrend = na
prevSuperTrend = superTrend[1]
if na(atr[1])
direction := 1
else
[superTrend, direction]
// Get Components
ema1 = ta.ema(high, 9)
sma1 = ta.sma(close, 5)
sma2 = ta.sma(close, 6)
sma3 = ta.sma(close, 7)
sma4 = ta.sma(close, 8)
sma5 = ta.sma(close, 9)
barsL = 10
barsR = 10
// Colors
// Plots
fill(p5, p6, usePsar ? (psar < ocAvg ? color.new(green, 90) : color.new(red, 90)) :
na, editable=false)
y1 = low - (ta.atr(30) * 2)
y2 = high + (ta.atr(30) * 2)
// Alerts