Ben direk belirttiğiniz posttakini copy paste yapıp yapıştırıyorum aşağıdaki uyarıyı vermekte bende
https://i.hizliresim.com/35c3xeq.JPG
Printable View
Ben direk belirttiğiniz posttakini copy paste yapıp yapıştırıyorum aşağıdaki uyarıyı vermekte bende
https://i.hizliresim.com/35c3xeq.JPG
copy paste hata verir genelde....
verilen linki ekleyin kullanın....
hata almazsınız.....
bu veridiğiniz kod....
kısa periyotta okla belirttiğim yerleri filtrelemiş gibi oluyor....
https://www.tradingview.com/x/Nr1iMuq8/
https://tr.tradingview.com/v/vHEkOeH5/
pivotla swing yapmak için.....
fill kullanıldı....çizgiler gizlendi....
https://www.tradingview.com/x/K8Hwy5m3/
PHP Code:
//@version=5
indicator("deneme", overlay = true, max_lines_count = 500, max_labels_count = 500, format=format.price)
////////////////////////////////////////
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © peacefulLizard50262
//@version=5
// Custom cosh function
cosh(float x) =>
(math.exp(x) + math.exp(-x)) / 2
// Custom acosh function
acosh(float x) =>
x < 1 ? na : math.log(x + math.sqrt(x * x - 1))
// Custom sinh function
sinh(float x) =>
(math.exp(x) - math.exp(-x)) / 2
// Custom asinh function
asinh(float x) =>
math.log(x + math.sqrt(x * x + 1))
// Custom inverse tangent function
atan(float x) =>
math.pi / 2 - math.atan(1 / x)
// Chebyshev Type I Moving Average
chebyshevI(float src, float len, float ripple) =>
a = 0.
b = 0.
g = 0.
chebyshev = 0.
a := cosh(1 / len * acosh(1 / (1 - ripple)))
b := sinh(1 / len * asinh(1 / ripple))
g := (a - b) / (a + b)
chebyshev := (1 - g) * src + g * nz(chebyshev[1])
chebyshev
// Chebyshev Type II Moving Average
chebyshevII(float src, float len, float ripple) =>
a = 0.
b = 0.
g = 0.
chebyshev = 0.
a := cosh(1 / len * acosh(1 / ripple))
b := sinh(1 / len * asinh(ripple))
g := (a - b) / (a + b)
chebyshev := (1 - g) * src + g * nz(chebyshev[1], src)
chebyshev
chebyshev(float src, float length, float ripple, bool style) =>
style ?
chebyshevI(src, length, ripple) :
chebyshevII(src, length, ripple)
source44 = input.source(hl2, "Source")
up_color = input.color(color.new(color.green, 20), "Up Color")
down_color = input.color(color.new(color.red, 20), "Down Color")
text_color = input.color(color.black, "Text Color")
mean_length = input.float(24, "Mean Length", 5, 1000, 0.5)
mean_ripple = input.float(0.5, "Mean Ripple", 0.01, 0.99, 0.01)
style44 = input.bool(false, "True Chebyshev I | False : Chebyshev II")
atr_style = input.bool(true, "True: |Open-Close| False: High-Low")
atr_length = input.float(64, "ATR Length", 6, 1000, 0.5)
atr_ripple = input.float(0.05, "Mean Ripple", 0.01, 0.99, 0.01)
multiplier = input.float(1.5, "Multiplier", 0.125, 10, 0.125)
alerts = input.bool(false, "Alerts")
labels = input.bool(true, "Labels")
atr = chebyshev(atr_style ? high - low : math.abs(open - close), atr_length, atr_ripple, style44)
mean = chebyshevI(source44, mean_length, mean_ripple)
var float offset = 0.0
var bool state = na
var float newOffset = 0.0
crossover = ta.crossover(source44, offset)
position = source44 > offset
crossunder = ta.crossunder(source44, offset)
prevOffset = nz(offset[1])
if crossover[2] and position[1] and position or (position and position[1] and position[2])
newOffset := mean - atr * multiplier
offset := newOffset < nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset : nz(prevOffset)
state := true
if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2])
newOffset := mean + atr * multiplier
offset := newOffset > nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset : nz(prevOffset)
state := false
cross = ta.cross(close, offset)
down_trend = not state and not state[1]
up_trend = state and state[1]
colour = up_trend ? up_color : down_trend ? down_color : color.new(color.white, 100)
if up_trend and not up_trend[1] and labels
label.new(bar_index, offset, "Up Trend \n" + str.tostring(close), color = up_color, style = label.style_label_up, textcolor = text_color)
alert("Up Trend at " + str.tostring(close))
else
alert("Up Trend at " + str.tostring(close))
if down_trend and not down_trend[1] and labels
label.new(bar_index, offset, "Down Trend \n" + str.tostring(close), color = down_color, style = label.style_label_down, textcolor = text_color)
alert("Down Trend at " + str.tostring(close))
else
alert("Down Trend at " + str.tostring(close))
plot(offset, "Trend", colour, style = plot.style_stepline_diamond)
//plotshape(cross, "Trend Is Getting Ready To Change", shape.xcross, location.belowbar, color = close > offset ? up_color : down_color)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Swing Bands
// Free for use. Header credits must be included when any form of the code included in this package is used.
// Any indicator built on this indicator needs to attribute the original author's work
// v1.0 - barbaros
//@version=5
pvtLenL = input.int(2, minval=1, title="Pivot Length Left Hand Side")
pvtLenR = input.int(2, minval=1, title="Pivot Length Right Hand Side")
maxcnt = input.int(2, minval=2, title="Max history")
var highs = array.new_float(0)
var lows = array.new_float(0)
pvthi = ta.pivothigh(high, pvtLenL, pvtLenR)
pvtlo = ta.pivotlow(low, pvtLenL, pvtLenR)
if not na(pvthi)
array.push(highs, pvthi)
if array.size(highs) > maxcnt
array.shift(highs)
if not na(pvtlo)
array.push(lows, pvtlo)
if array.size(lows) > maxcnt
array.shift(lows)
avghighs = array.avg(highs)
avglows = array.avg(lows)
midpoint = (avghighs + avglows) / 2
p1 = plot(avghighs, offset = 0, color=color.rgb(76, 175, 79, 100), title="Lead 1")
p2 = plot(avglows, offset = 0, color=color.rgb(255, 82, 82, 100), title="Lead 2")
mid = plot(midpoint, offset = 0, color=color.rgb(255, 255, 255, 100), title="Mid")
fill(p1, p2, color.new(#838aa5, 50))
direction = 0
direction := close > midpoint and close > open ? 1 : close < midpoint and close < open ? -1 : direction[1]
barcolor(direction == 1 ? color.yellow : direction == -1 ? color.red : color.gray)
https://tr.tradingview.com/v/JhZujkH3/
güzel fibo çalışması....
https://www.tradingview.com/x/MSmBXugK/
bunu yukarı atalım...https://www.tradingview.com/x/9cFdyCSC/
bar görüntüyü iptal.... https://www.tradingview.com/x/jlYb5ECS/
50 değerini 27 yapalım...https://www.tradingview.com/x/CjSRm3Mw/
yeşil ve kırmızıyı atalım...https://www.tradingview.com/x/7OXjILjY/
elde kalan 382 ve 618...
niye yaptık...bu fibo seviyelerini...trendle ilişkilendirdik....
https://www.tradingview.com/x/w0GJaV8G/
trend fiboyla kıyaslandı...
kodun birleşmiş hali....PHP Code:
//@version=5
indicator("deneme", overlay = true, max_lines_count = 500, max_labels_count = 500, format=format.price)
////////////////////////////////////////
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © peacefulLizard50262
//@version=5
// Custom cosh function
cosh(float x) =>
(math.exp(x) + math.exp(-x)) / 2
// Custom acosh function
acosh(float x) =>
x < 1 ? na : math.log(x + math.sqrt(x * x - 1))
// Custom sinh function
sinh(float x) =>
(math.exp(x) - math.exp(-x)) / 2
// Custom asinh function
asinh(float x) =>
math.log(x + math.sqrt(x * x + 1))
// Custom inverse tangent function
atan(float x) =>
math.pi / 2 - math.atan(1 / x)
// Chebyshev Type I Moving Average
chebyshevI(float src, float len, float ripple) =>
a = 0.
b = 0.
g = 0.
chebyshev = 0.
a := cosh(1 / len * acosh(1 / (1 - ripple)))
b := sinh(1 / len * asinh(1 / ripple))
g := (a - b) / (a + b)
chebyshev := (1 - g) * src + g * nz(chebyshev[1])
chebyshev
// Chebyshev Type II Moving Average
chebyshevII(float src, float len, float ripple) =>
a = 0.
b = 0.
g = 0.
chebyshev = 0.
a := cosh(1 / len * acosh(1 / ripple))
b := sinh(1 / len * asinh(ripple))
g := (a - b) / (a + b)
chebyshev := (1 - g) * src + g * nz(chebyshev[1], src)
chebyshev
chebyshev(float src, float length, float ripple, bool style) =>
style ?
chebyshevI(src, length, ripple) :
chebyshevII(src, length, ripple)
source44 = input.source(hl2, "Source")
up_color = input.color(color.new(color.green, 20), "Up Color")
down_color = input.color(color.new(color.red, 20), "Down Color")
text_color = input.color(color.black, "Text Color")
mean_length = input.float(24, "Mean Length", 5, 1000, 0.5)
mean_ripple = input.float(0.5, "Mean Ripple", 0.01, 0.99, 0.01)
style44 = input.bool(false, "True Chebyshev I | False : Chebyshev II")
atr_style = input.bool(true, "True: |Open-Close| False: High-Low")
atr_length = input.float(64, "ATR Length", 6, 1000, 0.5)
atr_ripple = input.float(0.05, "Mean Ripple", 0.01, 0.99, 0.01)
multiplier = input.float(1.5, "Multiplier", 0.125, 10, 0.125)
alerts = input.bool(false, "Alerts")
labels = input.bool(true, "Labels")
atr = chebyshev(atr_style ? high - low : math.abs(open - close), atr_length, atr_ripple, style44)
mean = chebyshevI(source44, mean_length, mean_ripple)
var float offset = 0.0
var bool state = na
var float newOffset = 0.0
crossover = ta.crossover(source44, offset)
position = source44 > offset
crossunder = ta.crossunder(source44, offset)
prevOffset = nz(offset[1])
if crossover[2] and position[1] and position or (position and position[1] and position[2])
newOffset := mean - atr * multiplier
offset := newOffset < nz(prevOffset) or close[1] > nz(prevOffset) ? newOffset : nz(prevOffset)
state := true
if crossunder[2] and not position[1] and not position or (not position and not position[1] and not position[2])
newOffset := mean + atr * multiplier
offset := newOffset > nz(prevOffset) or close[1] < nz(prevOffset) ? newOffset : nz(prevOffset)
state := false
cross = ta.cross(close, offset)
down_trend = not state and not state[1]
up_trend = state and state[1]
colour = up_trend ? up_color : down_trend ? down_color : color.new(color.white, 100)
if up_trend and not up_trend[1] and labels
label.new(bar_index, offset, "Up Trend \n" + str.tostring(close), color = up_color, style = label.style_label_up, textcolor = text_color)
alert("Up Trend at " + str.tostring(close))
else
alert("Up Trend at " + str.tostring(close))
if down_trend and not down_trend[1] and labels
label.new(bar_index, offset, "Down Trend \n" + str.tostring(close), color = down_color, style = label.style_label_down, textcolor = text_color)
alert("Down Trend at " + str.tostring(close))
else
alert("Down Trend at " + str.tostring(close))
plot(offset, "Trend", colour, style = plot.style_stepline_diamond)
//plotshape(cross, "Trend Is Getting Ready To Change", shape.xcross, location.belowbar, color = close > offset ? up_color : down_color)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Swing Bands
// Free for use. Header credits must be included when any form of the code included in this package is used.
// Any indicator built on this indicator needs to attribute the original author's work
// v1.0 - barbaros
//@version=5
pvtLenL = input.int(2, minval=1, title="Pivot Length Left Hand Side")
pvtLenR = input.int(2, minval=1, title="Pivot Length Right Hand Side")
maxcnt = input.int(2, minval=2, title="Max history")
var highs = array.new_float(0)
var lows = array.new_float(0)
pvthi = ta.pivothigh(high, pvtLenL, pvtLenR)
pvtlo = ta.pivotlow(low, pvtLenL, pvtLenR)
if not na(pvthi)
array.push(highs, pvthi)
if array.size(highs) > maxcnt
array.shift(highs)
if not na(pvtlo)
array.push(lows, pvtlo)
if array.size(lows) > maxcnt
array.shift(lows)
avghighs = array.avg(highs)
avglows = array.avg(lows)
midpoint = (avghighs + avglows) / 2
p1 = plot(avghighs, offset = 0, color=color.rgb(76, 175, 79, 100), title="Lead 1")
p2 = plot(avglows, offset = 0, color=color.rgb(255, 82, 82, 100), title="Lead 2")
mid = plot(midpoint, offset = 0, color=color.rgb(255, 255, 255, 100), title="Mid")
fill(p1, p2, color.new(#838aa5, 50))
direction = 0
direction := close > midpoint and close > open ? 1 : close < midpoint and close < open ? -1 : direction[1]
barcolor(direction == 1 ? color.yellow : direction == -1 ? color.red : color.gray)
////////////////////////////////////////////////////////////////////////////////////////////////
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Gedhusek
//@version=5
BackStep = input.int(27,"Analysis Period")
lowerValue = input.float(0.382,"Lower Fibonacci Level",options=[0.236, 0.382, 0.50, 0.618, 0.786])
upperValue = input.float(0.618,"Upper Fibonacci Level",options=[0.236, 0.382, 0.50, 0.618, 0.786])
showFill = input.bool(true,"Show Filling")
changeCandle = input.bool(true,"Change Candle Color")
atr77 = ta.atr(200)
max = ta.highest(close,BackStep)
min = ta.lowest(close,BackStep)
lowerFib = min + (max-min)*lowerValue
upperFib = min + (max-min)*upperValue
ma = ta.wma(close,6)
float closeVal = ma
float openVal = ma
color clrToUse = closeVal>upperFib and openVal>upperFib?color.green:closeVal<lowerFib and openVal<lowerFib?color.red:color.yellow
LowerFibLine = plot(lowerFib,color=color.rgb(189, 75, 255, 20))
UpperFibLine = plot(upperFib,color=color.rgb(189, 75, 255, 20))
float LowerRetracement = (max-min)*0.318
float UpperRetracement = (max-min)*0.618
https://tr.tradingview.com/v/J8GzFGfD/
coinler için tasarlanmış kod....
5 dakkalıkta kullanılması önerilmiş....
biz bunu hisseye alsak.... 1dakkada....
kullanılan trend kodu vardı....
onunla aynı yerde al vermesi için...
27 uzunluğu 10 multiple yapınca...
neredeyse sonuçlar aynı....
https://www.tradingview.com/x/4hDShtod/
niye yazdım derseniz....
kodların default değerleri farklı olabilir....
ama sizler değerlerle oynayıp....
diğeriyle aynı yerde sinyal ürettiriyorsanız....
kodların hesaplaması farklı olsa bile...sonuç aynı olacağı için.....
kod karmaşıklığına gerek yok......
trend için 5 kod....fibo için 5 kod...range için 5 kod birleştirmek....
işe yaramaz....
trend-ortalam-fibo- basit döngülerle.....
1 dakkalık periyotlar için dahi güzel şeyler çıkarılabilir....
sanırım anlatabildim....