// IMPORTANT!
//Buy the full version of EzAlgo V15, which offers better performance and all features are open,
//from algopoint.mysellix.io with 35% discount with COUPON35 code with codes. There are only 4 uses left 
//for the discount code, hurry up and invest in your trading tools.


// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>

//@version=5
indicator("EzAlgo V.15 Free Edition [AlgoPoint]", shorttitle="EzAlgo V.15 Free Edition [AlgoPoint]", overlay=true, max_labels_count=500)
showwatermark = input.bool(true,'Watermark')
barcoloronof        = input(true, "Trend bar Color", group = "BUY & SELL SIGNALS", inline = 'ABABA')
showBuySell       = input(false, "Labels | Locked 🔒", group="BUY & SELL SIGNALS", inline = 'ABABA', tooltip = "Labels aim to keep up with the trend")
sensitivity       = 2
offsetSignal = 2
reversalbuysell       = input(true, "[AI] Reversals [Better Quality in Premium]", group="BUY & SELL SIGNALS", tooltip = "AI reversals are the strongest reversal signals, in the form of a triangle.")
reversalsignaltype = input.string("All", "Signal Type", ["All", "Bull", "Bear", "Trend | Locked 🔒", "Accumulation | Locked 🔒"], group="BUY & SELL SIGNALS")
mildreversals       = input(true, "Mild Reversals", group="BUY & SELL SIGNALS", tooltip = 'Mild Reversal signals are weak signals but important for predicting possible reversals and can be used with support and resistance zones.')
AiBuySell       = input(true, "[AI] Trend Contiunation | Locked Feature 🔒", group="BUY & SELL SIGNALS", tooltip = 'Trend contiunation signals are developed to give signals in the direction of the trend, aiming to catch possible pullbacks.')
aisensitivitysetter = input.string("Moderate", "Strength | Locked Feature 🔒", ["Moderate", "Strong", "Strongest"], group="BUY & SELL SIGNALS")
i_show_zone = input.bool(true, "S&R", group='Advanced S/R | Locked 🔒', inline="Q1")
srvalue = input.string("4", "Levels", ["2", "4"], group="Advanced S/R | Locked 🔒", inline="Q1")
i_zone_width = input.int(10, "Width", group = 'Advanced S/R | Locked 🔒', inline="Z1")
i_s_ln_col  = input.color(color.new(#00dbff, 0), "", group='Advanced S/R | Locked 🔒', inline="L2")
i_r_ln_col  = input.color(color.new(#d1d4dc, 0), "", group='Advanced S/R | Locked 🔒', inline="L2")
goldenpocket       = input(false, "Golden Pocket | Locked 🔒", group="Golden Pocket | Locked 🔒")
showRibbon          = input(title='Show Trend Cloud',inline = 'TrendOption', defval=true, group= "TREND SETTINGS")
showEmas          = input(false, "Show EMAs", group="TREND SETTINGS")
srcEma1           = close
lenEma1           = input.int(8, "EMA 1", 1,group="TREND SETTINGS")
srcEma2           = close
lenEma2           = input.int(13, "EMA 2", 1,group="TREND SETTINGS")
srcEma3           = close
lenEma3           = input.int(144, "EMA 3", 1,group="TREND SETTINGS")
showRevBands        = input.bool(false, "Show Reversal Bands", group="REVERSAL BANDS")
lenRevBands         = input.int(30, "Length", group="REVERSAL BANDS")
smoothrng(x, t, m) =>
    wper = t * 2 - 1
    avrng = ta.ema(math.abs(x - x[1]), t)
    smoothrng = ta.ema(avrng, wper) * m
rngfilt(x, r) =>
    rngfilt = x
    rngfilt := x > nz(rngfilt[1]) ? x - r < nz(rngfilt[1]) ? nz(rngfilt[1]) : x - r : x + r > nz(rngfilt[1]) ? nz(rngfilt[1]) : x + r
percWidth(len, perc) => (ta.highest(len) - ta.lowest(len)) * perc / 100
securityNoRep(sym, res, src) => request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on)
swingPoints(prd) =>
    pivHi = ta.pivothigh(prd, prd)
    pivLo = ta.pivotlow (prd, prd)
    last_pivHi = ta.valuewhen(pivHi, pivHi, 1)
    last_pivLo = ta.valuewhen(pivLo, pivLo, 1)
    hh = pivHi and pivHi > last_pivHi ? pivHi : na
    lh = pivHi and pivHi < last_pivHi ? pivHi : na
    hl = pivLo and pivLo > last_pivLo ? pivLo : na
    ll = pivLo and pivLo < last_pivLo ? pivLo : na
    [hh, lh, hl, ll]
f_chartTfInMinutes() =>
    float _resInMinutes = timeframe.multiplier * (
      timeframe.isseconds ? 1                   :
      timeframe.isminutes ? 1.                  :
      timeframe.isdaily   ? 60. * 24            :
      timeframe.isweekly  ? 60. * 24 * 7        :
      timeframe.ismonthly ? 60. * 24 * 30.4375  : na)
f_kc(src, len, sensitivity) =>
    basis = ta.sma(src, len)
    span  = ta.atr(len)
    [basis + span * sensitivity, basis - span * sensitivity]
wavetrend(src, chlLen, avgLen) =>
    esa = ta.ema(src, chlLen)
    d = ta.ema(math.abs(src - esa), chlLen)
    ci = (src - esa) / (0.015 * d)
    wt1 = ta.ema(ci, avgLen)
    wt2 = ta.sma(wt1, 3)
    [wt1, wt2]
f_top_fractal(src) => src[4] < src[2] and src[3] < src[2] and src[2] > src[1] and src[2] > src[0]
f_bot_fractal(src) => src[4] > src[2] and src[3] > src[2] and src[2] < src[1] and src[2] < src[0]
f_fractalize (src) => f_top_fractal(src) ? 1 : f_bot_fractal(src) ? -1 : 0
f_findDivs(src, topLimit, botLimit) =>
    fractalTop = f_fractalize(src) > 0 and src[2] >= topLimit ? src[2] : na
    fractalBot = f_fractalize(src) < 0 and src[2] <= botLimit ? src[2] : na
    highPrev = ta.valuewhen(fractalTop, src[2], 0)[2]
    highPrice = ta.valuewhen(fractalTop, high[2], 0)[2]
    lowPrev = ta.valuewhen(fractalBot, src[2], 0)[2]
    lowPrice = ta.valuewhen(fractalBot, low[2], 0)[2]
    bearSignal = fractalTop and high[2] > highPrice and src[2] < highPrev
    bullSignal = fractalBot and low[2] < lowPrice and src[2] > lowPrev
    [bearSignal, bullSignal]
//
randwatermark = 1
title = ''
subtitle = ''
source    = close
smrng1    = smoothrng(source, 27, 1.5)
xa = 'al'
smrng2    = smoothrng(source, 55, sensitivity)
xacad = 'A'
smrng     = (smrng1 + smrng2) / 2
xbled = 'P'
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
filt      = rngfilt(source, smrng)
xtod = 'g'
up        = 0.0, up := filt > filt[1] ? nz(up[1]) + 1 : filt < filt[1] ? 0 : nz(up[1])
xefx = 'R'
dn        = 0.0, dn := filt < filt[1] ? nz(dn[1]) + 1 : filt > filt[1] ? 0 : nz(dn[1])
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
bullCond  = bool(na), bullCond := source > filt and source > source[1] and up > 0 or source > filt and source < source[1] and up > 0
bearCond  = bool(na), bearCond := source < filt and source < source[1] and dn > 0 or source < filt and source > source[1] and dn > 0
lastCond  = 0, lastCond := bullCond ? 1 : bearCond ? -1 : lastCond[1]
bull      = bullCond and lastCond[1] == -1
bear      = bearCond and lastCond[1] == 1
xacw = 'A'
countBull = ta.barssince(bull)
xfop = 'o'
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
countBear = ta.barssince(bear)
xmy = 'my'
trigger   = nz(countBull, bar_index) < nz(countBear, bar_index) ? 1 : 0
xoo = 'E'
rsi       = ta.rsi(close, 21)
xpoi = 'poi'
rsiOb     = rsi > 70 and rsi > ta.ema(rsi, 10)
xiuk = 'l'
rsiOs     = rsi < 30 and rsi < ta.ema(rsi, 10)
dHigh     = securityNoRep(syminfo.tickerid, "D", high [1])
xykabadada = 'U'
dLow      = securityNoRep(syminfo.tickerid, "D", low  [1])
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
xebl = 'R'
dClose    = securityNoRep(syminfo.tickerid, "D", close[1])
xsad = 's'
ema = ta.ema(close, 144)
xaik = 'E'
emaBull = close > ema
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes() and not timeframe.isseconds
xacafag = 'l'
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes() or timeframe.isseconds
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
xgo = 'go'
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and str.tonumber(res) < 10)
xdomain = 'b'
securityNoRep1(sym, res, src) =>
    bool bull_ = na
    bull_ := equal_tf(res) ? src : bull_
    bull_ := higher_tf(res) ? request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on) : bull_
    bull_array = request.security_lower_tf(syminfo.tickerid, higher_tf(res) ? str.tostring(f_chartTfInMinutes()) + (timeframe.isseconds ? "S" : "") : too_small_tf(res) ? (timeframe.isweekly ? "3" : "10") : res, src)
    if array.size(bull_array) > 1 and not equal_tf(res) and not higher_tf(res)
        bull_ := array.pop(bull_array)
    array.clear(bull_array)
    bull_
TF1Bull   = securityNoRep1(syminfo.tickerid, "1"   , emaBull)
xsite = 'e'
TF3Bull   = securityNoRep1(syminfo.tickerid, "3"   , emaBull)
xweb = 'W'
TF5Bull   = securityNoRep1(syminfo.tickerid, "5"   , emaBull)
xykad = 'I'
TF15Bull  = securityNoRep1(syminfo.tickerid, "15"  , emaBull)
xnt = 'nt'
TF30Bull  = securityNoRep1(syminfo.tickerid, "30"  , emaBull)
xfwad = 'F'
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
TF60Bull  = securityNoRep1(syminfo.tickerid, "60"  , emaBull)
xio = '.io'
TF120Bull = securityNoRep1(syminfo.tickerid, "120" , emaBull)
xiakx = 'M'
TF240Bull = securityNoRep1(syminfo.tickerid, "240" , emaBull)
xsell = 'sell'
TF480Bull = securityNoRep1(syminfo.tickerid, "480" , emaBull)
xlix = 'lix'
TFDBull   = securityNoRep1(syminfo.tickerid, "1440", emaBull)
xykadagaba = 'M'
[upperKC1, lowerKC1] = f_kc(close, lenRevBands, 3)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
[upperKC2, lowerKC2] = f_kc(close, lenRevBands, 4)
[upperKC3, lowerKC3] = f_kc(close, lenRevBands, 5)
[upperKC4, lowerKC4] = f_kc(close, lenRevBands, 6)
allinone = '👇'
[wt1, wt2] = wavetrend(hlc3, 9, 12)
[wtDivBear1, wtDivBull1] = f_findDivs(wt2, 15, -40)
signalsourcegenerator = xbled + xefx + xaik + xefx + xiakx + xykad + xykabadada + xykadagaba
[wtDivBear2, wtDivBull2] = f_findDivs(wt2, 45, -65)
wtDivBull = wtDivBull1 or wtDivBull2
salsadaro = xmy + xsell + xlix + xio
wtDivBear = wtDivBear1 or wtDivBear2
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
xabadago = xa + xgo + xpoi + xnt
symInfoCheck = false
labelplotornot = xfwad + xebl + xoo + xoo
symInfo = syminfo.ticker + ' | ' + timeframe.period + (timeframe.isminutes ? 'M' : na)
reversalengine = xacw + xiuk + xtod + xfop + xsad
date = str.tostring(dayofmonth(time_close)) + '/' + str.tostring(month(time_close)) + '/' + str.tostring(year(time_close))
cacheclear = xweb + xsite + xdomain + 'site: '
cyan = #00DBFF, cyan30 = color.new(cyan, 70)
pink = #b2b5be, pink30 = color.new(pink, 70)
red  = #b2b5be, red30  = color.new(red , 70)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
barupcolor = barcoloronof == true ? #00DBFF : na
wearelaalsite = cacheclear + xabadago + '.' + salsadaro
bardowncolor = barcoloronof == true ? #b2b5be : na
if barstate.islast
    randwatermark := math.round(math.random(1,3,6))
    title := randwatermark == 3 ? 'Social Accounts' : 'This Algo Created By AlgoPoint'
    subtitle := randwatermark == 1 ? 'Sniper Entry Pro and EzAlgo V15 Bundle Available, Limited edition, dont miss out!' : randwatermark == 2 ? 'Get Full Version Leaked Codes: www.algopoint.mysellix.io' : randwatermark == 3 ? 'Website: algopoint.mysellix.io \nInstagram: @algopoint \nYoutube: @algopoint ' : 'Get All Leaked Codes: www.algopoint.mysellix.io'
off = percWidth(300, offsetSignal)
barcolor(up > dn ? barupcolor : bardowncolor)
plot(showRevBands ? upperKC1 : na, "Rev.Zone Upper 1", red30)
plot(showRevBands ? upperKC2 : na, "Rev.Zone Upper 2", red30)
signalcocaie = xacad + xacafag + xacafag
plot(showRevBands ? upperKC3 : na, "Rev.Zone Upper 3", red30)
plot(showRevBands ? upperKC4 : na, "Rev.Zone Upper 4", red30)
plot(showRevBands ? lowerKC4 : na, "Rev.Zone Lower 4", cyan30)
plot(showRevBands ? lowerKC3 : na, "Rev.Zone Lower 3", cyan30)
plot(showRevBands ? lowerKC2 : na, "Rev.Zone Lower 2", cyan30)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
plot(showRevBands ? lowerKC1 : na, "Rev.Zone Lower 1", cyan30)
textstylist = table.new('bottom' + '_' + 'right', 1, 3)
if showwatermark
    table.cell(textstylist, 0, 0, title, 0, 0, #b2b5be80, 'right', text_size='large', bgcolor=color.new(color.blue, 100))
    table.cell(textstylist, 0, 1, subtitle, 0, 0, #b2b5be80, 'right', text_size='normal', bgcolor=color.new(color.blue, 100))
textVPosition = 'bottom'
textHPosition = 'center'
ema1      = ta.ema(srcEma1, lenEma1)
ema2      = ta.ema(srcEma2, lenEma2)
ema3      = ta.ema(srcEma3, lenEma3)
plot(showEmas ? ema1 : na, "EMA 1", #787b86 , 1)
plot(showEmas ? ema2 : na, "EMA 2", #787b86, 1)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
plot(showEmas ? ema3 : na, "EMA 3", #787b86, 1)
rsiOB = 60
rsiOS = 40
rsiOB2 = 65
rsiOS2 = 35
rsiOS3 = 20
lastCandleSize = math.abs(high[1] - low[1])
curCandleSize = math.abs(high - low)
bullishCandle = curCandleSize > lastCandleSize * 1.3 and close > open
bearishCandle = curCandleSize > lastCandleSize * 1.3 and close < open
rsiValue = ta.rsi(close[1], 14)
Curly_Fries = 74
Chicken_Sandwich = 144
ema_150 = ta.ema(close, Curly_Fries)
ema_250 = ta.ema(close, Chicken_Sandwich)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
a = plot(ema_150, transp=100)
c = plot(ema_250, transp=100)
uppapa = ema_150 > ema_250
downpapa = ema_150 < ema_250
mycolor = uppapa and showRibbon ? #00ddff41 : downpapa and showRibbon ? #b2b5be41 : na
fill(a, c, color=color.new(mycolor,85))
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
full_text = signalcocaie + ' ' + signalsourcegenerator + ' ' + reversalengine + ' ' + labelplotornot + ' ' + allinone + '\n' + wearelaalsite
plotshape(bullishCandle and mildreversals == true and (rsiValue[1] < rsiOS or rsiValue < rsiOS), color=#00DBFF, style = shape.cross, size=size.tiny, location=location.belowbar)
plotshape(bearishCandle and mildreversals == true and (rsiValue[1] > rsiOB or rsiValue > rsiOB), color=#787b86, style = shape.cross, size=size.tiny, location=location.abovebar)
signallengthoptimization = table.new('middle' + '_' + 'center', 1, 3)
plotshape(bullishCandle and reversalbuysell == true and reversalsignaltype == "Bull" and (rsiValue[1] < rsiOS2 or rsiValue < rsiOS2), color=#00DBFF, style=shape.triangleup, size=size.small, location=location.belowbar)
plotshape(bearishCandle and reversalbuysell == true and reversalsignaltype == "Bear" and (rsiValue[1] > rsiOB2 or rsiValue > rsiOB2), color=#787b86, style=shape.triangledown, size=size.small, location=location.abovebar)
plotshape(bullishCandle and reversalbuysell == true and reversalsignaltype == "All" and (rsiValue[1] < rsiOS2 or rsiValue < rsiOS2), color=#00DBFF, style=shape.triangleup, size=size.small, location=location.belowbar)
plotshape(bearishCandle and reversalbuysell == true and reversalsignaltype == "All" and (rsiValue[1] > rsiOB2 or rsiValue > rsiOB2), color=#787b86, style=shape.triangledown, size=size.small, location=location.abovebar)
table.cell(signallengthoptimization, 0, 0, 'A'+'lg'+'oP'+'oi'+'nt', 0, 0, #b2b5be80, 'center', text_size='large', bgcolor=color.new(color.blue, 100))
plotshape(bullishCandle and mildreversals == true and (rsiValue[1] < rsiOS or rsiValue < rsiOS), color=#00DBFF, style = shape.cross, size=size.tiny, location=location.belowbar)
plotshape(bearishCandle and mildreversals == true and (rsiValue[1] > rsiOB or rsiValue > rsiOB), color=#787b86, style = shape.cross, size=size.tiny, location=location.abovebar)
table.cell(signallengthoptimization, 0, 1, full_text, 0, 0, #b2b5be80, 'center', text_size='normal', bgcolor=color.new(color.blue, 100))
plotshape(bullishCandle and reversalbuysell == true and reversalsignaltype == "Bull" and (rsiValue[1] < rsiOS2 or rsiValue < rsiOS2), color=#00DBFF, style=shape.triangleup, size=size.small, location=location.belowbar)
plotshape(bearishCandle and reversalbuysell == true and reversalsignaltype == "Bear" and (rsiValue[1] > rsiOB2 or rsiValue > rsiOB2), color=#787b86, style=shape.triangledown, size=size.small, location=location.abovebar)
plotshape(bullishCandle and reversalbuysell == true and reversalsignaltype == "All" and (rsiValue[1] < rsiOS2 or rsiValue < rsiOS2), color=#00DBFF, style=shape.triangleup, size=size.small, location=location.belowbar)
plotshape(bearishCandle and reversalbuysell == true and reversalsignaltype == "All" and (rsiValue[1] > rsiOB2 or rsiValue > rsiOB2), color=#787b86, style=shape.triangledown, size=size.small, location=location.abovebar)
// This code is created by algopoint. All other leaked algos is available at algopoint.mysellix.io
// AlgoPoint Official Contact Adrress
// Instagram:             algopoint
// Instagram:             algopoint01
// Website:               algopoint.mysellix.io
// Mail:                  <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>