PHP Code:
//@version=6
indicator(title = 'kombine edilmiştir dilediğiniz değişikliği ve değer değişimlerini yapabilirsiniz keyif sizin', shorttitle = '.', overlay = true, max_lines_count = 500, max_labels_count=500)
///////////////////////////////////////////////////
//@version=6
var params = "Parameters"
src55 = nz(input.source(close, title = "Source", group = params))
len55 = input.int(10, title = "ATR Len", group = params)
multi55 = input.float(1.5, title = "Multi", step = 0.25, minval = 0, group = params)
var disp = "Display"
rng_tog = input.bool(true, title = "Consolidation Ranges", group = disp)
atr_tog = input.bool(false, title = "ATR Channel", group = disp)
var cols = "Colors"
up_col = input.color(#3daa45, title = "Up Color", group = cols)
down_col = input.color(#ff033e, title = "Down Color", group = cols)
flat_col = input.color(color.rgb(235, 243, 6), title = "Flat Color", inline = "3", group = cols)
rng_col = input.color(#004d9233, title = "", inline = "3", group = cols)
//Smooths a Source similar to Rope Stabilization in a Drawing Application. OR a "Range Filter" as some might say ;)
rope_smoother(float _src55, float _threshold) =>
var float _rope = _src55
_move = _src55 - _rope //Movement from Rope
_rope += math.max(math.abs(_move) - nz(_threshold), 0) * math.sign(_move) //Directional Movement beyond the Threshold
[_rope,_rope+_threshold,_rope-_threshold] //[Rope, Upper, Lower]
///_____________________________________________________________________________________________________________________
//Calculating Rope
atr = ta.atr(len55)*multi55
[rope,upper,lower] = rope_smoother(src55,atr)
//Directional Detection
var dir = 0
dir := rope > rope[1] ? 1 : rope < rope[1] ? -1 : dir
if ta.cross(src55,rope)
dir := 0
//Directional Color Assignment
col = dir > 0 ? up_col : dir < 0 ? down_col : flat_col
///_____________________________________________________________________________________________________________________
//High and Low Output Lines
var float c_hi = na
var float c_lo = na
//Counters for Accumulating Averages
var float h_sum = 0
var float l_sum = 0
var int c_count = 0
//Flip-Flop
var ff = 1
//Flip Flop, Pip Slip Top,
//Bear Drop, Bull Pop, Lunch Time Chop,
//Tight Stop, Desktop Prop.
if dir == 0
if dir[1] != 0
h_sum := 0
l_sum := 0
c_count := 0
ff := ff * -1
h_sum += upper
l_sum += lower
c_count += 1
c_hi := h_sum/c_count
c_lo := l_sum/c_count
///_____________________________________________________________________________________________________________________
//Rope
plot(rope, linewidth = 3, color = col, title = "Trend", force_overlay = true)
/////////////////////////////
//@version=6
grp1 = "Indicator Settings"
tpAggressiveness = input.string("low", "TP Aggressiveness", options=["low", "medium", "high"], group=grp1, tooltip="Controls how aggressive the Take Profit (TP) trigger is. Low = slower exits, High = faster exits.", display = display.data_window)
src = input.source(hlc3, "Source", group=grp1, tooltip="Price source used for band calculations", display = display.data_window)
len = input.int(21, "Length", group=grp1, tooltip="Length for the basis calculation", display = display.data_window)
atrLen = input.int(14, "ATR Length", group=grp1, tooltip="Length for ATR or Stdev volatility basis", display = display.data_window)
useATR = input.bool(true, "Use ATR", group=grp1, tooltip="Toggle between ATR or standard deviation for band width", display = display.data_window)
grp2 = "Visual Options"
showRej = input.bool(true, "Show Take Profit Crosses", group=grp2, display = display.data_window)
showBounce = input.bool(true, "Show Basis Bounce Arrows", group=grp2, display = display.data_window)
colorbar = input.bool(true, "Custom Bar Color", group=grp2, display = display.data_window)
green = input.color(#00ffbb, "Bullish Color", group=grp2, display = display.data_window)
red = input.color(#ff1100, "Bearish Color", group=grp2, display = display.data_window)
gray = input.color(color.fuchsia, "Basis Color", group=grp2, display = display.data_window)
basis = ta.ema(ta.ema(src, len), len)
vol = useATR ? ta.atr(atrLen) : ta.stdev(src, len)
mult1 = 0.618
mult2 = 1.0
mult3 = 1.618
mult4 = 2.618
var int trend = 0
trend := basis > basis[1] ? 1 : basis < basis[1] ? -1 : nz(trend[1])
upper1 = basis + vol * mult1
upper2 = basis + vol * mult2
upper3 = basis + vol * mult3
upper4 = basis + vol * mult4
lower1 = basis - vol * mult1
lower2 = basis - vol * mult2
lower3 = basis - vol * mult3
lower4 = basis - vol * mult4
plot(basis, title="F Trend", color=gray, linewidth=1)
//upper1_plot = plot(trend == -1 ? upper1 : na, title="Upper 0.618", color=color.new(red, 60), style=plot.style_linebr)
upper4_plot = plot(trend == -1 ? upper4 : na, title="Upper 2.618", color=color.new(red, 30), style=plot.style_linebr)
//lower1_plot = plot(trend == 1 ? lower1 : na, title="Lower 0.618", color=color.new(green, 60), style=plot.style_linebr)
lower4_plot = plot(trend == 1 ? lower4 : na, title="Lower 2.618", color=color.new(green, 30), style=plot.style_linebr)
//plot(trend == -1 ? upper2 : na, title="Upper 1.0", color=color.new(red, 50), style=plot.style_linebr)
//plot(trend == -1 ? upper3 : na, title="Upper 1.618", color=color.new(red, 40), style=plot.style_linebr)
//plot(trend == 1 ? lower2 : na, title="Lower 1.0", color=color.new(green, 50), style=plot.style_linebr)
//plot(trend == 1 ? lower3 : na, title="Lower 1.618", color=color.new(green, 40), style=plot.style_linebr)
Yer İmleri