RZ
RZ
RZ
0 at
https://mozilla.org/MPL/2.0/
// @ EzAlgo
//@version=5
indicator("Position Size Calculator (EzAlgo)", overlay=true)
if extend==false
line.set_x1(L, bar_index)
line.set_x2(L, bar_index+1)
line.set_extend(L, extend.right)
if extend==false
line.set_x1(L, bar_index)
line.set_x2(L, bar_index+1)
line.set_extend(L, extend.right)
if showtp1
draw_level(tp1_price , str.tostring(tp1_perc) + '% @ TP1', #00e676)
if showtp2
draw_level(tp2_price , str.tostring(tp2_perc) + '% @ TP2', #00e676)
if showtp3
draw_level(tp3_price , str.tostring(tp3_perc) + '% @ TP3', #00e676)
if showtp4
draw_level(tp4_price , str.tostring(tp4_perc) + '% @ TP4', #00e676)
if dca_sw
draw_level(dca_price, 'DCA Entry', #ffee58)
draw_level2(math.avg(dca_price,entry_price), 'Avg Entry', #787b86)
// RISK
entry_price := dca_sw==false? entry_price : math.avg(entry_price, dca_price)
SL_value = math.abs(entry_price-liq_price1)
// TABLE
string table_location = switch table_location_input
"Bottom Right" => position.bottom_right
"Top Left" => position.top_left
"Top Center" => position.top_center
"Top Right" => position.top_right
"Middle left" => position.middle_left
"Middle Center" => position.middle_center
"Middle Right" => position.middle_right
"Bottom Left" => position.bottom_left
"Bottom Center" => position.bottom_center
=> position.bottom_right
table_color = color.new(#07071f, 5 )//input(color.new(#07071f, 5 ), title='Table
Color', group='Table Settings')
table_borderColor = color.new(#d1d1d1, 34)//input(color.new(#d1d1d1, 34), title="Table
BorderColor", group='Table Settings')