Elite Algo
Elite Algo
// ─────────────────────────────────────────────────────────────
// This code is created by AlgoPoint. All other leaked algos are available at:
// Website: algopoint.mysellix.io
// Contact: algopointstore@gmail.com
// Discord: algopoint
// Instagram: algopoint / algopoint01
// ─────────────────────────────────────────────────────────────
// ⚠️ Scammer List:
// Discord Username: nedenolmuyor (ZZ_Algo)
// Discord Username: rayyav (MAD MAD) — Also Eyo Breakout Telegram Admin. Be
careful.
// ─────────────────────────────────────────────────────────────
// User Inputs & Display Settings
// ─────────────────────────────────────────────────────────────
title = "AlgoPoint"
subtitle = "All Leaked Algos | IG: algopoint"
symInfoCheck = false
symInfo = syminfo.ticker + " | " + timeframe.period +
(timeframe.isminutes ? "M" : "")
date = str.tostring(dayofmonth(time_close)) + "/" +
str.tostring(month(time_close)) + "/" + str.tostring(year(time_close))
textVPosition = "middle"
textHPosition = "center"
symVPosition = "top"
symHPosition = "left"
width = 0
height = 0
c_title = #b2b5be80
s_title = "large"
a_title = "center"
c_subtitle = #b2b5be80
s_subtitle = "normal"
a_subtitle = "center"
// ─────────────────────────────────────────────────────────────
// Volatility Calculator Function
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Garman-Klass Volatility
// ─────────────────────────────────────────────────────────────
f_gk(period, sqrtAnnual) =>
var LOG2 = math.log(2)
var SQRT_1_PERIOD = math.sqrt(1 / period)
powLogHighLow = math.pow(math.log(high / low), 2)
powLogCloseOpen = math.pow(math.log(close / open), 2)
tmp = 0.5 * powLogHighLow - (2.0 * LOG2 - 1.0) * powLogCloseOpen
sqrtAnnual * math.sqrt(math.sum(tmp, period)) * SQRT_1_PERIOD
// ─────────────────────────────────────────────────────────────
// Rogers-Satchell Volatility
// ─────────────────────────────────────────────────────────────
f_rsv(period, sqrtAnnual) =>
tmp = math.log(high / close) * math.log(high / open) + math.log(low / close) *
math.log(low / open)
sqrtAnnual * math.sqrt(math.sum(tmp, period) / period)
// ─────────────────────────────────────────────────────────────
// Garman-Klass Yang-Zhang Extension Volatility
// ─────────────────────────────────────────────────────────────
f_gkyz(period, sqrtAnnual) =>
var LOG2 = math.log(2)
var SQRT_1_PERIOD = math.sqrt(1 / period)
powLogHighLow = math.pow(math.log(high / low), 2)
powLogCloseOpen = math.pow(math.log(close / open), 2)
lastClose = nz(close[1], close)
powLogOpenClose1 = math.pow(math.log(open / lastClose), 2)
tmp = powLogOpenClose1 + 0.5 * powLogHighLow - (2.0 * LOG2 - 1.0) *
powLogCloseOpen
sqrtAnnual * math.sqrt(math.sum(tmp, period)) * SQRT_1_PERIOD
// ─────────────────────────────────────────────────────────────
// Yang-Zhang Volatility
// ─────────────────────────────────────────────────────────────
f_yz(a, period, sqrtAnnual) =>
oaman = math.log(open) - math.log(nz(close[1], close))
u = math.log(high) - math.log(open)
d = math.log(low) - math.log(open)
caman = math.log(close) - math.log(open)
nMinusOne = period - 1
avgo = ta.sma(oaman, period)
avgc = ta.sma(caman, period)
so = array.new_float(0)
sc = array.new_float(0)
for i = 0 to period - 1
array.push(so, math.pow(oaman[i] - avgo, 2))
array.push(sc, math.pow(caman[i] - avgc, 2))
sumo = array.sum(so)
sumc = array.sum(sc)
Vo = sumo / nMinusOne
Vc = sumc / nMinusOne
Vrs = math.sum(u * (u - caman) + d * (d - caman), period) / period
k = (a - 1.0) / (a + (period + 1.0) / nMinusOne)
sqrtAnnual * math.sqrt(Vo + k * Vc + (1.0 - k) * Vrs)
// ─────────────────────────────────────────────────────────────
// Exponentially Weighted Volatility
// ─────────────────────────────────────────────────────────────
f_ewma(source, period, sqrtAnnual) =>
var lambda = (period - 1) / (period + 1)
squared = math.pow(source, 2)
float v = na
v := lambda * nz(v[1], squared) + (1.0 - lambda) * squared
sqrtAnnual * math.sqrt(v)
// ─────────────────────────────────────────────────────────────
// Mean Absolute Deviation (Adjusted)
// ─────────────────────────────────────────────────────────────
f_mad(source, period, sqrtAnnual) =>
var SQRT_HALF_PI = math.sqrt(math.asin(1))
mean = ta.sma(source, period)
S = array.new_float(0)
for i = 0 to period - 1
array.push(S, math.abs(source[i] - mean))
sumS = array.sum(S)
sqrtAnnual * (sumS / period) * SQRT_HALF_PI
// ─────────────────────────────────────────────────────────────
// Median Absolute Deviation
// ─────────────────────────────────────────────────────────────
f_mead(source, period, sqrtAnnual) =>
median = ta.percentile_nearest_rank(source, period, 50)
E = 0.0
for i = 0 to period - 1
E += math.abs(source[i] - median)
sqrtAnnual * math.sqrt(2) * (E / period)
// ─────────────────────────────────────────────────────────────
// Rescale Function
// ─────────────────────────────────────────────────────────────
f_rescale(_src, _size) =>
math.max(0, math.min(_size, int(_src / 100 * _size)))
// ─────────────────────────────────────────────────────────────
// Label Panel Function
// ─────────────────────────────────────────────────────────────
_label(T, color_PnL) =>
label PnL_Label = na
label.delete(PnL_Label[1])
PnL_Label := label.new(time, 0, text=T, color=color_PnL, textcolor=color.white,
size=size.normal, style=label.style_label_left, xloc=xloc.bar_time,
textalign=text.align_left)
label.set_x(PnL_Label, label.get_x(PnL_Label) + math.round(ta.change(time) *
3))
// ─────────────────────────────────────────────────────────────
// Round Function
// ─────────────────────────────────────────────────────────────
Round(src, digits) =>
p = math.pow(10, digits)
math.round(math.abs(src) * p) / p * math.sign(src)
// ─────────────────────────────────────────────────────────────
// Options for Inputs
// ─────────────────────────────────────────────────────────────
ON = 'On'
OFF = 'Off'
// ─────────────────────────────────────────────────────────────
// Chart Style Options
// ─────────────────────────────────────────────────────────────
L = 'Line'
SL = 'StepLine'
Ar = 'Area'
CL = 'Columns'
// ─────────────────────────────────────────────────────────────
// Settings
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Volatility Calculations
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Plot Style & Watermark
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// HV Statistics
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Text Functions
// ─────────────────────────────────────────────────────────────
texthv() =>
' HV: ' + str.tostring(Round(Hv, 2))
textphv() =>
'HV 50 Percentile: ' + str.tostring(Round(HV50, 2))
texthvp() =>
'HV Percentile: ' + str.tostring(Round(HVP, 2)) + '%'
// ─────────────────────────────────────────────────────────────
// Coloring Gradient
// ─────────────────────────────────────────────────────────────
c_ = array.new_color()
array.push(c_, #0effff)
array.push(c_, #00fdf6)
array.push(c_, #00fbee)
array.push(c_, #00f9e4)
array.push(c_, #00f6db)
array.push(c_, #00f4d1)
array.push(c_, #13f1c6)
array.push(c_, #24efbc)
array.push(c_, #31ecb1)
array.push(c_, #3ce9a6)
array.push(c_, #47e69b)
array.push(c_, #51e390)
array.push(c_, #5adf85)
array.push(c_, #62dc7a)
array.push(c_, #6ad96e)
array.push(c_, #72d563)
array.push(c_, #7ad157)
array.push(c_, #81cd4b)
array.push(c_, #88ca3f)
array.push(c_, #8fc532)
array.push(c_, #96c123)
array.push(c_, #9cbd0e)
array.push(c_, #a3b800)
array.push(c_, #a9b300)
array.push(c_, #b0ae00)
array.push(c_, #b6a900)
array.push(c_, #bca300)
array.push(c_, #c29e00)
array.push(c_, #c89800)
array.push(c_, #ce9100)
array.push(c_, #d48b00)
array.push(c_, #da8400)
array.push(c_, #df7c00)
array.push(c_, #e57400)
array.push(c_, #ea6c00)
array.push(c_, #ef6200)
array.push(c_, #f35800)
array.push(c_, #f74c00)
array.push(c_, #fb3e00)
array.push(c_, #ff2d00)
if i_invert
array.reverse(c_)
sizeOf = array.size(c_) - 1
colorHV = Pco ? array.get(c_, f_rescale(HVP, sizeOf)) : color.aqua
// ─────────────────────────────────────────────────────────────
// Plots
// ─────────────────────────────────────────────────────────────
if sp
_label(symInfo + texthv() + '\n' + textphv() + '\n' + texthvp() + '\n\n',
#000000c0)
// ─────────────────────────────────────────────────────────────
// Custom MAS Levels
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Auto Sensitivity Volatility Band Settings
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Optional Plots
// ─────────────────────────────────────────────────────────────
// basic settings
if auto_button == false
sensitivity := sensitivity
else if auto_button == true
sensitivity := volatility
// ─────────────────────────────────────────────────────────────
// EK Cloud — Moving Average Engine
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Buy & Sell Signal Logic
// ─────────────────────────────────────────────────────────────
src = close
// Trend Counters
upward = 0.0
upward := filt > filt[1] ? nz(upward[1]) + 1 : filt < filt[1] ? 0 : nz(upward[1])
downward = 0.0
downward := filt < filt[1] ? nz(downward[1]) + 1 : filt > filt[1] ? 0 :
nz(downward[1])
// Keltner Channels
[mi, u, lo] = ta.kc(close, 90, 6.8)
[mid, upp, loww] = ta.kc(close, 90, 5.3)
[midd, ups, lowe] = ta.kc(close, 90, 4)
// Filter Bands
hband = filt + smrng
lband = filt - smrng
// Entry Conditions
longCond = bool(na)
shortCond = bool(na)
longCond := (src > filt and src > src[1] and upward > 0) or (src > filt and src <
src[1] and upward > 0)
shortCond := (src < filt and src < src[1] and downward > 0) or
(src < filt and src > src[1] and downward > 0)
// Signal State
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1]
// ─────────────────────────────────────────────────────────────
// Candle Rating — Trend Confidence Engine
// ─────────────────────────────────────────────────────────────
// CCI
TM_Long = ta.cci(close, 20) > 50
TM_Short = ta.cci(close, 20) < -50
// ADX
lenadx = 21
lensig = 21
limadx = 34
ADX_up = ta.change(high)
ADX_down = -ta.change(low)
trur = ta.rma(ta.tr, lenadx)
plus = fixnan(100 * ta.rma(ADX_up > ADX_down and ADX_up > 0 ? ADX_up : 0,
lenadx) / trur)
minus = fixnan(100 * ta.rma(ADX_down > ADX_up and ADX_down > 0 ? ADX_down : 0,
lenadx) / trur)
macol = adx > limadx and plus > minus ? color.lime : adx > limadx and plus <
minus ? color.red : color.black
// Accumulation/Distribution
ACC_Dist = ta.sma(ta.accdist, 21)
ACC_Long = ta.accdist > ACC_Dist
ACC_Short = ta.accdist < ACC_Dist
// MFI
MFI = ta.mfi(close, 14)
MFI_SMA = ta.sma(MFI, 9)
MFI_Long = MFI > MFI_SMA
MFI_Short= MFI < MFI_SMA
// ─────────────────────────────────────────────────────────────
// Entry Conditions
// ─────────────────────────────────────────────────────────────
entry_long = true
entry_short = entry_long // Same condition reused
if entry_long
Long_Signal_Strength := 0
if TM_Long
Long_Signal_Strength += 1
if ADX_Long
Long_Signal_Strength += 1
if ACC_Long
Long_Signal_Strength += 1
if MFI_Long
Long_Signal_Strength += 1
if MOML_Long
Long_Signal_Strength += 1
if entry_short
Short_Signal_Strength := 0
if TM_Short
Short_Signal_Strength += 1
if ADX_Short
Short_Signal_Strength += 1
if ACC_Short
Short_Signal_Strength += 1
if MFI_Short
Short_Signal_Strength += 1
if MOML_Short
Short_Signal_Strength += 1
// ─────────────────────────────────────────────────────────────
// Trend Detecting — Settings & Global Variables
// ─────────────────────────────────────────────────────────────
// Settings
length = input.int(20, 'Length', minval=1, maxval=100)
incr = input.int(100, 'Increment', minval=1, maxval=200)
resetOn = input.string('CHoCH', 'Reset On', options=['CHoCH', 'Other'])
showMS = input.bool(false, 'Show MS')
// Style
bullCss = input.color(color.teal, 'Bullish Color')
bearCss = input.color(color.red, 'Bearish Color')
retCss = input.color(#ff5d00, 'Retrace Color')
areaTransp = input.int(100, 'Area Transparency', minval=0, maxval=100)
// Global Variables
var float ph_y = na
var int ph_x = na
var int os = 0
var int ms = 0
// ─────────────────────────────────────────────────────────────
// Detect Pivots and Get Coordinates
// ─────────────────────────────────────────────────────────────
n = bar_index
ph = ta.pivothigh(length, length)
pl = ta.pivotlow(length, length)
if not na(ph)
ph_y := ph
ph_x := n - length
ph_cross := false
if not na(pl)
pl_y := pl
pl_x := n - length
pl_cross := false
// ─────────────────────────────────────────────────────────────
// Bullish Structures
// ─────────────────────────────────────────────────────────────
if showMS
line.new(ph_x, ph_y, n, ph_y, color=bullCss, style=os == -1 ?
line.style_dashed : line.style_dotted)
os := 1
// ─────────────────────────────────────────────────────────────
// Bearish Structures
// ─────────────────────────────────────────────────────────────
if showMS
line.new(pl_x, pl_y, n, pl_y, color=bearCss, style=os == 1 ?
line.style_dashed : line.style_dotted)
os := -1
// ─────────────────────────────────────────────────────────────
// Trailing Stop Logic
// ─────────────────────────────────────────────────────────────
// Trailing max/min
if ms == 1
maxaman := close
else if ms == -1
minaman := close
else
maxaman := math.max(close, maxaman)
minaman := math.min(close, minaman)
// ─────────────────────────────────────────────────────────────
// Plot Styling
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Buy/Sell Signal Conditions
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Signal Strength Text Labels
// ─────────────────────────────────────────────────────────────
enter_pluslong = str.tostring(Long_Signal_Strength)
enter_plussell = str.tostring(Short_Signal_Strength)
enter_longtrt = str.tostring(Long_Signal_Strength)
enter_selltrtt = str.tostring(Short_Signal_Strength)
// ─────────────────────────────────────────────────────────────
// Repainting Filter
// ─────────────────────────────────────────────────────────────
if noRepainting
buyCond := buyCond and barstate.isconfirmed
strongBuyCond1 := strongBuyCond1 and barstate.isconfirmed
sellCond := sellCond and barstate.isconfirmed
strongSellCond1 := strongSellCond1 and barstate.isconfirmed
// ─────────────────────────────────────────────────────────────
// Buy Signal Labels
// ─────────────────────────────────────────────────────────────
BuySignal = signalMode == 'Simple Entry + Exits' and buyCond and not
strongSignalOnly ? label.new(bar_index, low, buysigtex, xloc.bar_index,
yloc.belowbar, #00cf4b8c,
label.style_label_up, color.white, size.normal) : na
// ─────────────────────────────────────────────────────────────
// Sell Signal Labels
// ─────────────────────────────────────────────────────────────
SellSignal = signalMode == 'Simple Entry + Exits' and sellCond and not
strongSignalOnly ? label.new(bar_index, high, selsigtex, xloc.bar_index,
yloc.abovebar, #ff00008c,
label.style_label_down, color.white, size.normal) : na
// ─────────────────────────────────────────────────────────────
// Candle Color Logic
// ─────────────────────────────────────────────────────────────
barcolor = src > filt and src > src[1] and upward > 0 ? color.new(#00db0a, 5) :
src > filt and src < src[1] and upward > 0 ? color.new(#00db05, 5) :
src < filt and src < src[1] and downward > 0 ? color.new(#c90505, 5) :
src < filt and src > src[1] and downward > 0 ? color.new(#ff0000, 5) :
color.new(#3ebe48, 5)
// ─────────────────────────────────────────────────────────────
// Reversal Cloud Visualization
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Reversal Bands
// ─────────────────────────────────────────────────────────────
// Fill Zones
fill(u1, u2, color=color.new(#f23645, 65), title='Reversal Zones [R3, R2]')
fill(u2, u3, color=color.new(#f23645, 75), title='Reversal Zones [R2, R1]')
fill(l2, l3, color=color.new(#089981, 75), title='Reversal Zones [S2, S1]')
fill(l1, l2, color=color.new(#089981, 65), title='Reversal Zones [S3, S2]')
// ─────────────────────────────────────────────────────────────
// Trend Catcher
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Frequency Cloud
// ─────────────────────────────────────────────────────────────
// ─────────────────────────────────────────────────────────────
// Order Block Configuration
// ─────────────────────────────────────────────────────────────
colup = #089981
coldn = #f23645
// Display Settings
obshow = input.bool(true, "Show Last", group="Order Blocks", inline='1',
tooltip="Show Last number of order blocks")
oblast = input.int(3, "", minval=0, maxval=50, step=1, group="Order
Blocks", inline='1')
obupcs = input.color(color.new(colup, 90), "", group="Order Blocks",
inline='1')
obdncs = input.color(color.new(coldn, 90), "", group="Order Blocks",
inline='1')
// ─────────────────────────────────────────────────────────────
// Order Block Alerts
// ─────────────────────────────────────────────────────────────
var dir = 0
dir := high[len_ob] > up ? -1 : low[len_ob] < dn ? 1 : dir[1]
atr = ta.atr(len_ob)
if pv and dir == 1
array.push(array_ob_blob, low[len_ob])
if blcreated
alert("Bullish OB Formed")
if pv and dir == -1
array.push(array_ob_brob, high[len_ob])
if brcreated
alert("Bearish OB Formed")