0% found this document useful (0 votes)
31 views3 pages

High - Low Distance Ratio - Trend Identifier (AlgoPoint)

Uploaded by

fcgh383
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views3 pages

High - Low Distance Ratio - Trend Identifier (AlgoPoint)

Uploaded by

fcgh383
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

// This code is created by algopoint.

All other leaked algos is available at


algopoint.mysellix.io For Free!!
// AlgoPoint Official Contact Adrress
// Instagram: algopoint
// Instagram: algopoint01
// Website: algopoint.mysellix.io
// Mail: [email protected]

//@version=5
indicator('High/Low Distance Ratio | Trend Identifier [AlgoPoint]', precision=3,
overlay=false)

// Input//
length = input.int(defval = 34, title = 'Lengths', minval = 1, group = 'High/Low')
src = input.string(defval = 'High/Low', options = ['Close', 'High/Low'], group =
'High/Low')
show_maxmin = input.bool(defval = false, title = 'Show Maximum High Line ?', group
= 'High/Low')
show_table = input.bool(defval = true, title = 'Show table?')
show_retracement = input.bool(defval = false, title = 'Show Retracement Ratio?',
group = 'Retracement')
reverse_retracement = input.bool(defval = false, title = 'Reverse Retracement?',
group = 'Retracement')

hi_source = close
lo_source = close
if src == 'Close'
hi_source := close
lo_source := close
if src == 'High/Low'
hi_source := low
lo_source := high

//Var//
Distance_from_PH = 0.
Distance_to_PH = 0.
PH_reached = false

Distance_from_PL = 0.
Distance_to_PL = 0.
PL_reached = false

//Pivots//
highest_1 = ta.highest(high, length)
lowest_1 = ta.lowest(low, length)

if bar_index >= 1
Distance_from_PH := math.round(100 * (1 - (lo_source / highest_1)),2)
Distance_from_PL := math.round(100 * ((hi_source/lowest_1)-1),2)

if Distance_from_PH == 0
PH_reached := true
PH_reached
plotshape(PH_reached, title='Top renew', color=color.new(#94ee6d, 10),
style=shape.circle, location = location.top)

if Distance_from_PL == 0
PL_reached := true
PL_reached
plotshape(PL_reached, title='Bottom renew', color=color.new(#f18080, 10),
style=shape.circle, location = location.top)

max_up = ta.highest(Distance_from_PL, length)

//Retracement//

Retracement = 1-math.round((close-lowest_1)/(highest_1-lowest_1),2)

if reverse_retracement
Retracement := math.round((close-lowest_1)/(highest_1-lowest_1),2)

//Plots//
plot(Distance_from_PH, 'Distance from Bottom (%)', color=color.new(color.maroon,
0), linewidth=1)
plot(Distance_from_PL, 'Distance from Top (%)', color=color.new(color.green, 0),
linewidth=1)
plot(show_retracement ? Retracement*100 : na, 'REt', color=color.new(color.white,
0), linewidth=1)

plot(show_maxmin ? max_up : na, title = 'Maximum High from Bottom',


color=color.new(#4f884b, 0), style=plot.style_line, trackprice = true)

hline(show_retracement ? 75 : na, '0.75', color=color.new(color.white, 60),


linewidth=1)
hline(show_retracement ? 50 : na, '0.5', color=color.new(color.white, 60),
linewidth=1)
hline(show_retracement ? 25 : na, '0.25', color=color.new(color.white, 60),
linewidth=1)

h_0 = hline(0, '0% line', color=color.new(color.white, 80))

if (barstate.islast)
line.new(bar_index[length], 0, bar_index[length], 0 * 1.01, extend =
extend.both, color=color.new(color.white, 30), style = line.style_dashed)

if show_table
var Table = table.new(position = position.top_right, columns = 4, rows = 4,
frame_width = 1, bgcolor = color.rgb(0,0,0, 50), border_width = 1, border_color =
color.gray, frame_color = color.gray)

table.cell(table_id = Table, column = 0, row = 1, text = 'From Bottom :',


text_color = color.white)
table.cell(table_id = Table, column = 0, row = 2, text = 'From Top:',
text_color = color.white)
if show_retracement
table.cell(table_id = Table, column = 0, row = 3, text = 'Retrace Ratio:',
text_color = color.white)

table.cell(table_id = Table, column = 1, row = 1, text =


str.tostring(Distance_from_PL)+'%', text_color =color.new(color.green, 0))
table.cell(table_id = Table, column = 1, row = 2, text =
str.tostring(Distance_from_PH)+'%', text_color =color.new(color.maroon, 0))
if show_retracement
table.cell(table_id = Table, column = 1, row = 3, text =
str.tostring(Retracement), text_color =color.new(color.white, 10))
//text inputs
var user_consensus = input.string(defval="", title="All Leaked Algo's At 👉
algopoint.mysellix.io", confirm = true, group="AlgoPoint")
title = 'AlgoPoint'
subtitle = 'All Free Algos \n Website: algopoint.mysellix.io'
textVPosition = 'middle'
textHPosition = 'center'
symVPosition = 'top'
symHPosition = 'left'
width = 0
height = 0
c_title = #b2b5be80
s_title = 'normal'
a_title = 'center'
c_subtitle = #b2b5be80
s_subtitle = 'small'
a_subtitle = 'center'
c_bg = color.new(color.blue, 100)
//text watermark creation
textstylist = table.new(textVPosition + '_' + textHPosition, 1, 3)
table.cell(textstylist, 0, 0, title, width, height, c_title, a_title,
text_size=s_title, bgcolor=c_bg)
table.cell(textstylist, 0, 1, subtitle, width, height, c_subtitle, a_subtitle,
text_size=s_subtitle, bgcolor=c_bg)

You might also like