PHP Code:
//@version=6
indicator(title = '...', shorttitle = '.', overlay = true, max_lines_count = 100, max_labels_count=100)
ye99 = input.int(100, 'P1', minval = 1)
ye98 = input.string('Percentage')
hpFilter(sye97, ye99) =>
var float ye96 = na
ye96 := na(ye96[1]) ? sye97 : (sye97 + (ye99 - 1) * nz(ye96[1])) / ye99
ye96
//
ye95 = hpFilter(close, ye99)
ye92 = (close - ye95) / ye95 * 100
ye87 = close - ye95
var ye94 = array.new_float()
var ye93 = array.new_float()
if ye98 == 'Percentage'
if ye92 > 0
array.push(ye94, ye92)
else if ye92 < 0
array.push(ye93, ye92)
//
ye91 = array.size(ye94) > 0 ? array.avg(ye94) : na
ye90 = array.size(ye93) > 0 ? array.avg(ye93) : na
ye89 = ye91 / 100 * ye95 + ye95
ye88 = ye90 / 100 * ye95 + ye95
plot(ye95, title = '100-M ', color = color.rgb(3, 36, 247), linewidth = 2, force_overlay = true)
plot(ye89, title = '100-H ', color = color.rgb(3, 36, 247), force_overlay = true, style = plot.style_line)
plot(ye88, title = '100-L ', color = color.rgb(3, 36, 247), force_overlay = true, style = plot.style_line)
ye993 = input.int(250, 'P1', minval = 1)
ye983 = input.string('Percentage')
hpFilter3(sye973, ye993) =>
var float ye963 = na
ye963 := na(ye963[1]) ? sye973 : (sye973 + (ye993 - 1) * nz(ye963[1])) / ye993
ye963
//
ye953 = hpFilter3(close, ye993)
ye923 = (close - ye953) / ye953 * 100
ye873 = close - ye953
var ye943 = array.new_float()
var ye933 = array.new_float()
if ye983 == 'Percentage'
if ye923 > 0
array.push(ye943, ye923)
else if ye923 < 0
array.push(ye933, ye923)
//
ye913 = array.size(ye943) > 0 ? array.avg(ye943) : na
ye903 = array.size(ye933) > 0 ? array.avg(ye933) : na
ye893 = ye913 / 100 * ye953 + ye953
ye883 = ye903 / 100 * ye953 + ye953
plot(ye953, title = '250-M ', color = color.rgb(11, 247, 3), linewidth = 2, force_overlay = true)
plot(ye893, title = '250-H ', color = color.rgb(11, 247, 3), force_overlay = true, style = plot.style_line)
plot(ye883, title = '250-L ', color = color.rgb(11, 247, 3), force_overlay = true, style = plot.style_line)
ye9936 = input.int(500, 'P1', minval = 1)
ye9836 = input.string('Percentage')
hpFilter36(sye9736, ye9936) =>
var float ye9636 = na
ye9636 := na(ye9636[1]) ? sye9736 : (sye9736 + (ye9936 - 1) * nz(ye9636[1])) / ye9936
ye9636
//
ye9536 = hpFilter36(close, ye9936)
ye9236 = (close - ye9536) / ye9536 * 100
ye8736 = close - ye9536
var ye9436 = array.new_float()
var ye9336 = array.new_float()
if ye9836 == 'Percentage'
if ye9236 > 0
array.push(ye9436, ye9236)
else if ye9236 < 0
array.push(ye9336, ye9236)
//
ye9136 = array.size(ye9436) > 0 ? array.avg(ye9436) : na
ye9036 = array.size(ye9336) > 0 ? array.avg(ye9336) : na
ye8936 = ye9136 / 100 * ye9536 + ye9536
ye8836 = ye9036 / 100 * ye9536 + ye9536
plot(ye9536, title = '500-M ', color = color.rgb(247, 3, 3), linewidth = 2, force_overlay = true)
plot(ye8936, title = '500-H ', color = color.rgb(247, 3, 3), force_overlay = true, style = plot.style_line)
plot(ye8836, title = '500-L ', color = color.rgb(247, 3, 3), force_overlay = true, style = plot.style_line)
//////////////////////////////////////////////////////////////////MTF SAR HESAPLAMASIDIR///////////////
start46 = input(0.)
increment46 = input(0.1)
maximum46 = input(0.9, "Max Value")
out55 = ta.sar(start46, increment46, maximum46)
plot_color = close > out55 ? color.rgb(5, 182, 64) : close < out55 ? color.rgb(169, 7, 7) : na
show_header = input(false, title="Show header?", group='Table Settings')
dashboard_position = input.string("Top center", title="Position", options=["Top right", "Top center", "Middle right"], group='Table Settings')
text_size = input.string('Normal', title="Size", options=["Tiny", "Small", "Normal", "Large"], group='Table Settings')
text_color = input.color(color.rgb(11, 68, 224), title="Text color", group='Table Settings')
table_color = input.color(color.purple, title="Border color", group='Table Settings')
uptrend_indicator = "🔵"
downtrend_indicator = "🟠"
tf11 = input.timeframe("1", title="Timeframe 1")
tf22 = input.timeframe("3", title="Timeframe 2")
tf33 = input.timeframe("5", title="Timeframe 3")
tf4 = input.timeframe("10", title="Timeframe 4")
tf5 = input.timeframe("15", title="Timeframe 5")
tf6 = input.timeframe("30", title="Timeframe 6")
tf7 = input.timeframe("60", title="Timeframe 7")
tf8 = input.timeframe("120", title="Timeframe 8")
tf9 = input.timeframe("240", title="Timeframe 9")
tf10 = input.timeframe("D", title="Timeframe 10")
var table_position = dashboard_position == 'Top center' ? position.middle_left :
dashboard_position == 'Top center' ? position.middle_left :
dashboard_position == 'Middle right' ? position.middle_right : position.middle_right
var table_text_size = text_size == 'Normal' ? size.normal :
text_size == 'Small' ? size.small : size.normal
var t = table.new(position=table_position, columns=3, rows=20, frame_color=#cdcbcb, frame_width=5, border_color=table_color, border_width=1,bgcolor =color.rgb(21, 21, 21) )
get_trend_status(trend_value) =>
is_uptrend = close > trend_value
candle_now = is_uptrend ? uptrend_indicator : downtrend_indicator
candle_now
//--------------------------------------------------------------------------------------
sar_1 = request.security(syminfo.tickerid, tf11, ta.sar(start46, increment46, maximum46))
sar_2 = request.security(syminfo.tickerid, tf22, ta.sar(start46, increment46, maximum46))
sar_3 = request.security(syminfo.tickerid, tf33, ta.sar(start46, increment46, maximum46))
sar_4 = request.security(syminfo.tickerid, tf4, ta.sar(start46, increment46, maximum46))
sar_5 = request.security(syminfo.tickerid, tf5, ta.sar(start46, increment46, maximum46))
sar_6 = request.security(syminfo.tickerid, tf6, ta.sar(start46, increment46, maximum46))
sar_7 = request.security(syminfo.tickerid, tf7, ta.sar(start46, increment46, maximum46))
sar_8 = request.security(syminfo.tickerid, tf8, ta.sar(start46, increment46, maximum46))
sar_9 = request.security(syminfo.tickerid, tf9, ta.sar(start46, increment46, maximum46))
sar_10 = request.security(syminfo.tickerid, tf10, ta.sar(start46, increment46, maximum46))
trend_indicator_1 = get_trend_status(sar_1)
trend_indicator_2 = get_trend_status(sar_2)
trend_indicator_3 = get_trend_status(sar_3)
trend_indicator_4 = get_trend_status(sar_4)
trend_indicator_5 = get_trend_status(sar_5)
trend_indicator_6 = get_trend_status(sar_6)
trend_indicator_7 = get_trend_status(sar_7)
trend_indicator_8 = get_trend_status(sar_8)
trend_indicator_9 = get_trend_status(sar_9)
trend_indicator_10 = get_trend_status(sar_10)
if tf11 == "60"
tf11 := "1H"
if tf11 == "120"
tf11 := "2H"
if tf11 == "180"
tf11 := "3H"
if tf11 == "240"
tf11 := "4H"
if tf22 == "60"
tf22 := "1H"
if tf22 == "120"
tf22 := "2H"
if tf22 == "180"
tf22 := "3H"
if tf22 == "240"
tf22 := "4H"
if tf33 == "60"
tf33 := "1H"
if tf33 == "120"
tf33 := "2H"
if tf33 == "180"
tf33 := "3H"
if tf33 == "240"
tf33 := "4H"
if tf4 == "60"
tf4 := "1H"
if tf4 == "120"
tf4 := "2H"
if tf4 == "180"
tf4 := "3H"
if tf4 == "240"
tf4 := "4H"
if tf5 == "60"
tf5 := "1H"
if tf5 == "120"
tf5 := "2H"
if tf5 == "180"
tf5 := "3H"
if tf5 == "240"
tf5 := "4H"
if tf6 == "60"
tf6 := "1H"
if tf6 == "120"
tf6 := "2H"
if tf6 == "180"
tf6 := "3H"
if tf6 == "240"
tf6 := "4H"
if tf7 == "60"
tf7 := "1H"
if tf7 == "120"
tf7 := "2H"
if tf7 == "180"
tf7 := "3H"
if tf7 == "240"
tf7 := "4H"
if tf8 == "60"
tf8 := "1H"
if tf8 == "120"
tf8 := "2H"
if tf8 == "180"
tf8 := "3H"
if tf8 == "240"
tf8 := "4H"
if tf9 == "60"
tf9 := "1H"
if tf9 == "120"
tf9 := "2H"
if tf9 == "180"
tf9 := "3H"
if tf9 == "240"
tf9 := "4H"
if tf10 == "60"
tf10 := "1H"
if tf10 == "120"
tf10 := "2H"
if tf10 == "180"
tf10 := "3H"
if tf10 == "240"
tf10 := "4H"
//---------------------------------------------------------------------------------------------
// Update table with trend data
//---------------------------------------------------------------------------------------------
if (barstate.islast)
table.cell(t, 0, 1, tf11, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 1, text="●", text_color=trend_indicator_1==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 1, str.tostring(sar_1, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 2, tf22, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 2, text="●", text_color=trend_indicator_2==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 2, str.tostring(sar_2, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 3, tf33, text_color=color.white, text_size=table_text_size,bgcolor= color.rgb(21, 21, 21))
table.cell(t, 1, 3, text="●", text_color=trend_indicator_3==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 3, str.tostring(sar_3, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 4, tf4, text_color=color.white, text_size=table_text_size, bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 4, text="●", text_color=trend_indicator_4==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 4, str.tostring(sar_4, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 5, tf5, text_color=color.white, text_size=table_text_size, bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 5, text="●", text_color=trend_indicator_5==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 5, str.tostring(sar_5, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 6, tf6, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 6, text="●", text_color=trend_indicator_6==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 6, str.tostring(sar_6, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 7, tf7, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 7, text="●", text_color=trend_indicator_7==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 7, str.tostring(sar_7, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 8, tf8, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 8, text="●", text_color=trend_indicator_8==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 8, str.tostring(sar_8, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 9, tf9, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 9, text="●", text_color=trend_indicator_9==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 9, str.tostring(sar_9, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 0, 10, tf10, text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t, 1, 10, text="●", text_color=trend_indicator_10==uptrend_indicator?color.lime:color.red,text_size = size.large)
table.cell(t, 2, 10, str.tostring(sar_10, "#.##"), text_color=color.white, text_size=table_text_size,bgcolor = color.rgb(21, 21, 21))
table.cell(t,0,0,"Periyot",text_color = color.white,bgcolor = color.rgb(21, 21, 21))
table.cell(t,1,0,"Trend",text_color = color.white,bgcolor = color.rgb(21, 21, 21))
table.cell(t,2,0,"Fiyat",text_color = color.white,bgcolor = color.rgb(21, 21, 21))
lookback = input.int(5, "Line Lookback Period", minval=1)
Yer İmleri