dikkatli olmak lazım....
Printable View
not aynı...görünüm değişmez diyorlar...
yedekleme ilerdeki çalışma için....
HTML Kod://@version=6
indicator(title = 'Sar Döngüler', shorttitle = '.', overlay = true, max_lines_count = 500, max_labels_count=500)
///////ilk üçlü hızlı olan sar döngüleridir////////////////
renk = input(true)
ju1 = ta.sar(0.09, 0.002, 0.1)
plot(ju1, title = '1', style = plot.style_circles, color = renk ? ju1 > low ? color.rgb(255, 255, 255) : color.rgb(255, 255, 255) :color.silver, linewidth = 2)
ju2 = ta.sar(0.05, 0.02, 0.1)
plot(ju2, title = '2', style = plot.style_circles, color = renk ? ju2 > low ? color.rgb(255, 255, 255) : color.rgb(255, 255, 255) :color.silver, linewidth = 2)
ju3 = ta.sar(0.02, 0.2, 0.1)
plot(ju3, title = '3', style = plot.style_circles, color = renk ? ju3 > low ? color.rgb(255, 255, 255) : color.rgb(255, 255, 255) :color.silver, linewidth = 2)
///////////orta hızlı sar döngülerin hesaplamasıdır//////////////
uj1 = ta.sar(0*0.1, 0.9*0.1, 0.2*1)
uj2 = ta.sar(0*0.1, 0.09*0.1, 0.2*1)
uj3 = ta.sar(0.2*0.1, 0.2*0.1, 0.2*1)
plot(uj1, title = '4', style = plot.style_cross, color = renk ? uj1 > low ? color.rgb(255, 0, 0) : color.rgb(255, 0, 0) :color.silver, linewidth = 2)
plot(uj2, title = '5', style = plot.style_cross, color = renk ? uj2 > low ? color.rgb(255, 0, 0) : color.rgb(255, 0, 0) : color.silver, linewidth = 2)
plot(uj3, title = '6', style = plot.style_cross, color = renk ? uj3 > low ? color.rgb(255, 0, 0) : color.rgb(255, 0, 0) : color.silver, linewidth = 2)
///////yavaş döngülü sar hesaplamasıır//////////
op1 = ta.sar(0.02*0.1, 0.2*0.1, 0.2*1)
plot(op1, title = '7', style = plot.style_stepline_diamond, color = renk ? op1 > low ? color.rgb(0, 0, 0) : color.rgb(0, 0, 0) : color.silver, linewidth = 1)
op2 = ta.sar(0.02*0.1, 0.2*0.01, 0.2*1)
plot(op2, "8", style=plot.style_stepline_diamond, color = renk ? op2 > low ? color.rgb(0, 0, 0) : color.rgb(0, 0, 0) :color.silver, linewidth = 1)
op3 = ta.sar(0*0.1, 0.02*0.1, 0.2*1)
plot(op3, title = '9', style = plot.style_stepline_diamond, color = renk ? op3 > low ? color.rgb(0, 0, 0) : color.rgb(0, 0, 8) : color.silver, linewidth = 1)
/////////////////////////////////////////////////////////////////////MTF SAR HESAPLAMASIDIR///////////////
out789 = ta.sar(0.02*0.1, 0.02*0.1, 0.2*1)
plot(out789, "12", style=plot.style_cross, color=color.rgb(90, 131, 245, 100))
psar1 = ta.sar(0.09, 0.2, 0.2)
psar_long1 = high[1] < psar1[2] and high >= psar1[1]
psar_short1 = low[1] > psar1[2] and low <= psar1[1]
plot(psar1, title="10", style = plot.style_cross, color = low <= psar1[1] and not psar_long1 ? color.red : color.white, linewidth = 3)
psar12 = ta.sar(0.09, 0.02, 0.2)
psar_long12 = high[1] < psar12[2] and high >= psar12[1]
psar_short12 = low[1] > psar12[2] and low <= psar12[1]
plot(psar12, title="11", style = plot.style_cross, color = low <= psar12[1] and not psar_long12 ? color.red : color.white, linewidth = 3)
psar123 = ta.sar(0.09, 0.002, 0.2)
psar_long123 = high[1] < psar123[2] and high >= psar123[1]
psar_short123 = low[1] > psar123[2] and low <= psar123[1]
özel çalışma...özel ilişkilendirme içermektedir ve gözden geçirmesi yapılacak.....yedekleme....
HTML Kod://@version=6
indicator('.', overlay = true)
ehad = input(true, title = 'Renklendirme')
/////verisi kullanılacak sistemler...indikatörler.....
/////veri...
//Functions Sar for support and resistance
q3 = ta.sar(0.01, 0.01, 0.1)
q2 = ta.sar(0.01, 0.03, 0.3)
q1 = ta.sar(0.01, 0.05, 0.5)
//hesaplanan veriyi zaman döngüsüne aktarma.....
fatiha = q3
kadir = q2
velasr = q1
/////tüm zaman döngülerinin tanımı.....
//İnned dîne indâllâhil İslâm...Ali-İmran 19.ayet
bakara = input.timeframe('1', title = 'Periyot')
aliimran = input.timeframe('3', title = 'Periyot')
nisa = input.timeframe('5', title = 'Periyot')
maide = input.timeframe('15', title = 'Periyot')
enam = input.timeframe('30', title = 'Periyot')
araf = input.timeframe('45', title = 'Periyot')
enfal = input.timeframe('60', title = 'Periyot')
tevbe = input.timeframe('120', title = 'Periyot')
yunus = input.timeframe('180', title = 'Periyot')
hud = input.timeframe('240', title = 'Periyot')
yusuf = input.timeframe('D', title = 'Periyot')
rad = input.timeframe('W', title = 'Periyot')
ibrahim = input.timeframe('M', title = 'Periyot')
hicr = input.timeframe('3M', title = 'Periyot')
nahl = input.timeframe('12M', title = 'Periyot')
// Security 1 veriyi zaman döngüsünde hesaplatma...
isra = request.security(syminfo.tickerid, bakara, fatiha)
kehf = request.security(syminfo.tickerid, aliimran, fatiha)
meryem = request.security(syminfo.tickerid, nisa, fatiha)
taha = request.security(syminfo.tickerid, maide, fatiha)
enbiya = request.security(syminfo.tickerid, enam, fatiha)
hac = request.security(syminfo.tickerid, araf, fatiha)
muminun = request.security(syminfo.tickerid, enfal, fatiha)
nur = request.security(syminfo.tickerid, tevbe, fatiha)
furkan = request.security(syminfo.tickerid, yunus, fatiha)
suara = request.security(syminfo.tickerid, hud, fatiha)
neml = request.security(syminfo.tickerid, yusuf, fatiha)
kasas = request.security(syminfo.tickerid, rad, fatiha)
ankebut = request.security(syminfo.tickerid, ibrahim, fatiha)
rum = request.security(syminfo.tickerid, hicr, fatiha)
lokman = request.security(syminfo.tickerid, nahl, fatiha)
//Signal...1veri zaman döngüsü sinyalleri hesapla ve çizdir
tegabun = isra
plot(tegabun, title = '1-Anlık', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
talak = (isra + kehf + meryem) / 3
//plot(talak, title='1.Veri-5DakikayaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
tahrim = (isra + kehf + meryem + taha) / 4
//plot(tahrim, title='1.Veri-15DakikayaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
mulk = (isra + kehf + meryem + taha + enbiya + hac + muminun) / 7
plot(mulk, title = '1-Saatlik', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
kalem = (isra + kehf + meryem + taha + enbiya + hac + muminun + nur + furkan + suara + neml) / 11
plot(kalem, title = '1-Günlük', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
hakka = (isra + kehf + meryem + taha + enbiya + hac + muminun + nur + furkan + suara + neml + kasas) / 12
plot(hakka, title = '1-Haftalık', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
mearic = (isra + kehf + meryem + taha + enbiya + hac + muminun + nur + furkan + suara + neml + kasas + ankebut) / 13
//plot(mearic, title='1.Veri-AyaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
nuh = (isra + kehf + meryem + taha + enbiya + hac + muminun + nur + furkan + suara + neml + kasas + ankebut + rum) / 14
//plot(nuh, title='1.Veri-ÜçAyaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
cin = (isra + kehf + meryem + taha + enbiya + hac + muminun + nur + furkan + suara + neml + kasas + ankebut + rum + lokman) / 15
//plot(cin, title='1.Veri-YılaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
// 2.veriyi zamanda döndürme
secde = request.security(syminfo.tickerid, bakara, kadir)
ahzab = request.security(syminfo.tickerid, aliimran, kadir)
sebe = request.security(syminfo.tickerid, nisa, kadir)
fatir = request.security(syminfo.tickerid, maide, kadir)
yasin = request.security(syminfo.tickerid, enam, kadir)
saffat = request.security(syminfo.tickerid, araf, kadir)
sad = request.security(syminfo.tickerid, enfal, kadir)
zumer = request.security(syminfo.tickerid, tevbe, kadir)
mumin = request.security(syminfo.tickerid, yunus, kadir)
fussilet = request.security(syminfo.tickerid, hud, kadir)
sura = request.security(syminfo.tickerid, yusuf, kadir)
zuhruf = request.security(syminfo.tickerid, rad, kadir)
duhan = request.security(syminfo.tickerid, ibrahim, kadir)
casiye = request.security(syminfo.tickerid, hicr, kadir)
ahkaf = request.security(syminfo.tickerid, nahl, kadir)
///2veri
muzzemmil = secde
plot(muzzemmil, title = '2-Anlık', style = plot.style_stepline, color = ehad ? secde > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
muddesir = (secde + ahzab + sebe) / 3
//plot(muddesir, title='2.Veri-5DakikayaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
kiyamet = (secde + ahzab + sebe + fatir) / 4
//plot(kiyamet, title='2.Veri-15DakikayaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
insan = (secde + ahzab + sebe + fatir + yasin + saffat + sad) / 7
plot(insan, title = '2-Saatlik', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
murselat = (secde + ahzab + sebe + fatir + yasin + saffat + sad + zumer + mumin + fussilet + sura) / 11
plot(murselat, title = '2-Günlük', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
nebe = (secde + ahzab + sebe + fatir + yasin + saffat + sad + zumer + mumin + fussilet + sura + zuhruf) / 12
plot(nebe, title = '2-Haftalık', style = plot.style_stepline, color = ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
naziat = (secde + ahzab + sebe + fatir + yasin + saffat + sad + zumer + mumin + fussilet + sura + zuhruf + duhan) / 13
//plot(naziat, title='2.Veri-AyaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
abese = (secde + ahzab + sebe + fatir + yasin + saffat + sad + zumer + mumin + fussilet + sura + zuhruf + duhan + casiye) / 14
//plot(abese, title='2.Veri-ÜçAyaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
tekvir = (secde + ahzab + sebe + fatir + yasin + saffat + sad + zumer + mumin + fussilet + sura + zuhruf + duhan + casiye + ahkaf) / 15
//plot(tekvir, title='2.Veri-YılaDöngü', style=plot.style_stepline, color=ehad ? isra > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
// Security3.veriyi zamanda döndürme...
fetih = request.security(syminfo.tickerid, bakara, velasr)
hucurat = request.security(syminfo.tickerid, aliimran, velasr)
kaf = request.security(syminfo.tickerid, nisa, velasr)
zariyat = request.security(syminfo.tickerid, maide, velasr)
tur = request.security(syminfo.tickerid, enam, velasr)
necm = request.security(syminfo.tickerid, araf, velasr)
kamer = request.security(syminfo.tickerid, enfal, velasr)
vakia = request.security(syminfo.tickerid, tevbe, velasr)
hadid = request.security(syminfo.tickerid, yunus, velasr)
mucadele = request.security(syminfo.tickerid, hud, velasr)
hasr = request.security(syminfo.tickerid, yusuf, velasr)
mumtehine = request.security(syminfo.tickerid, rad, velasr)
saf = request.security(syminfo.tickerid, ibrahim, velasr)
cuma = request.security(syminfo.tickerid, hicr, velasr)
munafik = request.security(syminfo.tickerid, nahl, velasr)
/////3.veri...bilgiler...
infitar = fetih
plot(infitar, title = '3-Anlık', style = plot.style_stepline, color = ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
mutaffifin = (fetih + hucurat + kaf) / 3
//plot(mutaffifin, title='3.Veri-5DakikayaDöngü', style=plot.style_stepline, color=ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
insikak = (fetih + hucurat + kaf + zariyat) / 4
//plot(insikak, title='3.Veri-15DakikayaDöngü', style=plot.style_stepline, color=ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
buruc = (fetih + hucurat + kaf + zariyat + tur + necm + kamer) / 7
plot(buruc, title = '3-Saatlik', style = plot.style_stepline, color = ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
tarik = (fetih + hucurat + kaf + zariyat + tur + necm + kamer + vakia + hadid + mucadele + hasr) / 11
plot(tarik, title = '3-Günlük', style = plot.style_stepline, color = ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
ala = (fetih + hucurat + kaf + zariyat + tur + necm + kamer + vakia + hadid + mucadele + hasr + mumtehine) / 12
plot(ala, title = '3-Haftalık', style = plot.style_stepline, color = ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 2)
gasiye = (fetih + hucurat + kaf + zariyat + tur + necm + kamer + vakia + hadid + mucadele + hasr + mumtehine + saf) / 13
//plot(gasiye, title='3.Veri-AyaDöngü', style=plot.style_stepline, color=ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
fecr = (fetih + hucurat + kaf + zariyat + tur + necm + kamer + vakia + hadid + mucadele + hasr + mumtehine + saf + cuma) / 14
//plot(fecr, title='3.Veri-ÜçayaDöngü', style=plot.style_stepline, color=ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
beled = (fetih + hucurat + kaf + zariyat + tur + necm + kamer + vakia + hadid + mucadele + hasr + mumtehine + saf + cuma + munafik) / 15
//plot(beled, title='3.Veri-YılaDöngü', style=plot.style_stepline, color=ehad ? fetih > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=2)
/////////////////
plot(q3, title = 'UV-Sar', style = plot.style_circles, color = ehad ? isra > close ? color.rgb(2, 250, 238) : color.rgb(250, 225, 3) : color.silver, linewidth = 1)
plot(q2, title = 'OV-Sar', style = plot.style_circles, color = ehad ? isra > close ? color.rgb(2, 250, 238) : color.rgb(250, 225, 3) : color.silver, linewidth = 1)
plot(q1, title = 'KV-Sar', style = plot.style_circles, color = ehad ? isra > close ? color.rgb(2, 250, 238) : color.rgb(250, 225, 3) : color.silver, linewidth = 1)
//Signal
//Signal
bcolor = ta.crossunder(close[1], q1) ? color.red : ta.crossover(close[1], q1) ? color.green : q1[1] > q3 ? color.green : q1[1] < q3 ? color.red : color.rgb(216, 4, 253) // : color.black
barcolor(bcolor)
sadeleme ve kontrol edilecek....yedekleme...
HTML Kod://@version=6
indicator(title = 'yörük', shorttitle = '.', overlay = true, max_lines_count = 100, max_labels_count=100, max_boxes_count = 100, max_bars_back = 100)
//@version=6
var table logo = table.new(position.bottom_center, 1, 1)
if barstate.islast
table.cell(logo, 0, 0, '@yörük@', text_size = size.normal, text_color = color.rgb(218, 241, 5))
///////////////////atr hesaplaması///////////////////////////////////////////////////////
var params = "Parameters"
src55 = nz(input.source(close, title = "Source", group = params))
len55 = input.int(5, title = "ATR Len", group = params)
multi55 = input.float(1.5, title = "Multi", step = 0.25, minval = 0, group = params)
var cols = "Colors"
up_col = input.color(color.rgb(255, 255, 255, 00), title = "Yükseliş", group = cols)
down_col = input.color(color.rgb(247, 3, 3), title = "DÜşüş", group = cols)
flat_col = input.color(color.rgb(249, 249, 5), title = "Flat ", inline = "3", group = cols)
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
atr99 = ta.atr(len55)*multi55
[rope,upper,lower] = rope_smoother(src55,atr99)
//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
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
///
plot(rope, linewidth = 2, color = col, title = "ATR1", force_overlay = true)
////////////////////////////////
src5566 = nz(input.source(close, title = "Source", group = params))
len5566 = input.int(5, title = "ATR Len", group = params)
multi5566 = input.float(5.5, title = "Multi", step = 0.25, minval = 0, group = params)
rope_smoother66(float _src5566, float _threshold) =>
var float _rope = _src5566
_move = _src5566 - _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
atr9966 = ta.atr(len5566)*multi5566
[rope66,upper66,lower66] = rope_smoother66(src5566,atr9966)
//Directional Detection
var dir66 = 0
dir66 := rope66 > rope66[1] ? 1 : rope66 < rope66[1] ? -1 : dir66
if ta.cross(src5566,rope66)
dir66 := 0
//Directional Color Assignment
col66 = dir66 > 0 ? up_col : dir66 < 0 ? down_col : flat_col
//High and Low Output Lines
var float c_hi66 = na
var float c_lo66 = na
//Counters for Accumulating Averages
var float h_sum66 = 0
var float l_sum66 = 0
var int c_count66 = 0
//Flip-Flop
var ff66 = 1
if dir66 == 0
if dir66[1] != 0
h_sum66 := 0
l_sum66 := 0
c_count66 := 0
ff66 := ff66 * -1
h_sum66 += upper66
l_sum66 += lower66
c_count66 += 1
c_hi66 := h_sum66/c_count66
c_lo66 := l_sum66/c_count66
///
plot(rope66, linewidth = 2, color = col66, title = "ATR2", force_overlay = true)
///////////////////////////////////////////
src556677 = nz(input.source(close, title = "Source", group = params))
len556677 = input.int(5, title = "ATR Len", group = params)
multi556677 = input.float(10.5, title = "Multi", step = 0.25, minval = 0, group = params)
rope_smoother6677(float _src556677, float _threshold) =>
var float _rope = _src556677
_move = _src556677 - _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
atr996677 = ta.atr(len556677)*multi556677
[rope6677,upper6677,lower6677] = rope_smoother66(src556677,atr996677)
//Directional Detection
var dir6677 = 0
dir6677 := rope6677 > rope6677[1] ? 1 : rope6677 < rope6677[1] ? -1 : dir6677
if ta.cross(src556677,rope6677)
dir6677 := 0
//Directional Color Assignment
col6677 = dir6677 > 0 ? up_col : dir6677 < 0 ? down_col : flat_col
//High and Low Output Lines
var float c_hi6677 = na
var float c_lo6677 = na
//Counters for Accumulating Averages
var float h_sum6677 = 0
var float l_sum6677 = 0
var int c_count6677 = 0
//Flip-Flop
var ff6677 = 1
if dir6677 == 0
if dir6677[1] != 0
h_sum6677 := 0
l_sum6677 := 0
c_count6677 := 0
ff6677 := ff6677 * -1
h_sum6677 += upper6677
l_sum6677 += lower6677
c_count66 += 1
c_hi6677 := h_sum6677/c_count6677
c_lo6677 := l_sum6677/c_count6677
///
plot(rope6677, linewidth = 2, color = col6677, title = "ATR3", force_overlay = true)
//////////////////////////////////////
zx1= ta.sar(0.2, 0.02, 0.2)
zx2= ta.sar(0.02, 0.04, 0.2)
zx3= ta.sar(0.02, 0.02, 0.2)
zx4= ta.sar(0.02, 0.09, 0.01)
zx5= ta.sar(0.01, 0.03, 0.2)
zx6= ta.sar(0.01, 0.04, 0.4)
zx7= ta.sar(0.01, 0.05, 0.5)
zx8 = ta.sar(0.01, 0.03, 0.03)
zx9 = ta.sar(0.01, 0.04, 0.04)
zx10 = ta.sar(0.01, 0.06, 0.05)
zx11= ta.sar(0., 0.9, 0.1)
zx12= ta.sar(0.02, 0.2, 0.02)
plot(zx1, title = 'X1', style = plot.style_cross, color = color.white, linewidth = 2)
plot(zx2, title = 'X3', style = plot.style_cross, color = color.white, linewidth = 2)
plot(zx3, title = 'Y2', style = plot.style_cross, color = color.lime, linewidth = 2)
plot(zx4, title = 'Z4', style = plot.style_cross, color = color.fuchsia, linewidth = 2)
plot(zx5, title = 'Y1', style = plot.style_cross, color = color.lime, linewidth = 2)
plot(zx6, title = 'X4', style = plot.style_cross, color = color.white, linewidth = 2)
plot(zx7, title = 'X2', style = plot.style_cross, color = color.white, linewidth = 2)
plot(zx8, title = 'Z2', style = plot.style_cross, color = color.fuchsia, linewidth = 2)
plot(zx9, title = 'Z1', style = plot.style_cross, color = color.fuchsia, linewidth = 2)
plot(zx10, title = 'Y4', style = plot.style_cross, color = color.lime, linewidth = 2)
plot(zx11, title = 'Y3', style = plot.style_cross, color = color.lime, linewidth = 2)
plot(zx12, title = 'Z3', style = plot.style_cross, color = color.fuchsia, linewidth = 2)
mft123=(zx3+zx5+zx10+zx11)/4
plot(mft123, title = 'SarYOrt', style = plot.style_cross, color = color.lime, linewidth = 2)
mft12=(zx4+zx8+zx9+zx12)/4
plot(mft12, title = 'SarZOrt', style = plot.style_cross, color = color.fuchsia, linewidth = 2)
mft1=(zx1+zx2+zx6+zx7)/4
plot(mft1, title = 'SarXOrt', style = plot.style_cross, color = color.white, linewidth = 2)
mft16=(zx1+zx2+zx6+zx7+zx4+zx8+zx9+zx12)/8
plot(mft16, title = 'SarXZOrt', style = plot.style_cross, color = color.orange, linewidth = 2)
mft=(zx1+zx2+zx3+zx4+zx5+zx6+zx7+zx8+zx9+zx10+zx11+zx12)/12
plot(mft, title = 'SarORT', style = plot.style_circles, color = color.blue, linewidth = 3)
///////////////////////////////////////////////////////////////sar ile bar renklendirme/////////
//@version=6
// —————————————————————————————————————————
f_colorNew(_color, _transp) =>
var _r = color.r(_color)
var _g = color.g(_color)
var _b = color.b(_color)
color _return = color.rgb(_r, _g, _b, _transp)
_return
//automatic higher timeframe chooser
f_autoHTF(str) =>
str == '1S' or str == '5S' or str == '10S' or str == '15S' or str == '20S' or str == '30S' or str == '40S' or str == '45S' or str == '50S' ? '1' : str == '1' or str == '2' or str == '3' or str == '4' ? '5' : str == '5' or str == '10' ? '15' : str == '15' or str == '20' ? '30' : str == '30' or str == '45' or str == '50' ? '60' : str == '60' or str == '90' or str == '100' ? '120' : str == '120' or str == '180' ? '240' : str == '240' ? 'D' : str == 'D' ? 'W' : str == 'W' ? '2W' : 'M'
var string ticker = syminfo.tickerid
var string tfp = timeframe.period
htf1 = f_autoHTF(tfp)
htf2 = f_autoHTF(htf1)
htf3 = f_autoHTF(htf2)
htf4 = f_autoHTF(htf3)
f_security(_sym, _res, _src, _rep) =>
request.security(_sym, _res, _src[not _rep and barstate.isrealtime ? 1 : 0])[_rep or barstate.isrealtime ? 0 : 1]
//PSAR inputs
grpin = '⚙=====-----'
grpout = '-----=====⚙'
grpPSAR = grpin + 'Dual PSAR Options:' + grpout
colorBull = input.color(defval = #f6f8fa, group = grpPSAR, title = 'Bullish Color') //Light Blue
colorBear = input.color(defval = #fc0707, group = grpPSAR, title = 'Bearish Color') //yellow
colorWait = input.color(defval = color.rgb(241, 191, 9), group = grpPSAR, title = 'Wait Color') //grey
showRecolorCandles = input.bool(true, 'Show Trend Full-Candle Recoloring?', group = grpPSAR, tooltip = 'Recolor the full candle including wick and border with trend color.')
psar_start = input.float(defval = 0., group = grpPSAR, title = 'PSAR: Start', minval = 0., maxval = 2, step = 0.01)
psar_accel = input.float(defval = 0.1, group = grpPSAR, title = 'PSAR: Acceleration Factor', minval = 0.01, maxval = 2, step = 0.01)
psar_maximum = input.float(defval = 0.9, group = grpPSAR, title = 'PSAR: Extreme Point', minval = 0.01, maxval = 2)
f_psar() =>
ta.sar(psar_start, psar_accel, psar_maximum)
psar_ctf = f_psar()
psar_htf = f_security(ticker, htf1, f_psar(), false)
longZone = psar_ctf < low and psar_htf < low
shortZone = psar_ctf > high and psar_htf > high
waitZone = not longZone and not shortZone
trendSupportColor = longZone ? colorBull : shortZone ? colorBear : colorWait
plotcandle(showRecolorCandles ? open : na, high, low, close, color = trendSupportColor, wickcolor = trendSupportColor, bordercolor = trendSupportColor, title = 'BAR')
barcolor(trendSupportColor)
//@version=6
//resolution
x1 = input.timeframe('1', title = 'Resolution')
x3 = input.timeframe('3', title = 'Resolution')
x5 = input.timeframe('5', title = 'Resolution')
x15 = input.timeframe('15', title = 'Resolution')
x30 = input.timeframe('30', title = 'Resolution')
x45 = input.timeframe('45', title = 'Resolution')
x60 = input.timeframe('60', title = 'Resolution')
x120 = input.timeframe('120', title = 'Resolution')
x180 = input.timeframe('180', title = 'Resolution')
x240 = input.timeframe('240', title = 'Resolution')
x720 = input.timeframe('D', title = 'Resolution')
//output functions
z = ta.sar(0., 0.1, 0.9)
// Security
y1 = request.security(syminfo.tickerid, x1, z)
y3 = request.security(syminfo.tickerid, x3, z)
y5 = request.security(syminfo.tickerid, x5, z)
y15 = request.security(syminfo.tickerid, x15, z)
y30 = request.security(syminfo.tickerid, x30, z)
y45 = request.security(syminfo.tickerid, x45, z)
y60 = request.security(syminfo.tickerid, x60, z)
y120 = request.security(syminfo.tickerid, x120, z)
y180 = request.security(syminfo.tickerid, x180, z)
y240 = request.security(syminfo.tickerid, x240, z)
y720 = request.security(syminfo.tickerid, x720, z)
//Plots
xz = input(true, title = 'Adaptive Coloring')
plot(y1, title = '1DAK', style = plot.style_circles, color = xz ? y1 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y3, title = '3DAK', style = plot.style_circles, color = xz ? y3 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y5, title = '5DAK', style = plot.style_circles, color = xz ? y5 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y15, title = '15DAK', style = plot.style_circles, color = xz ? y15 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y30, title = '30DAK', style = plot.style_circles, color = xz ? y30 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y45, title = '45DAK', style = plot.style_circles, color = xz ? y45 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y60, title = '1SAAT', style = plot.style_circles, color = xz ? y60 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y120, title = '2SAAT', style = plot.style_circles, color = xz ? y120 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y180, title = '3SAAT', style = plot.style_circles, color = xz ? y180 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y240, title = '4SAAT', style = plot.style_circles, color = xz ? y240 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth = 1)
plot(y720, title='1GÜN', style=plot.style_circles, color=xz ? y720 > close ? color.rgb(255, 82, 82, 100) : color.rgb(0, 230, 119, 100) : color.silver, linewidth=1)
takibe alınanlar....28temmuz-15ağustos arası için...
https://www.tradingview.com/x/HeeZkJu8/
https://www.tradingview.com/x/hYnbHPZh/
https://www.tradingview.com/x/Nf4nCRx2/
https://www.tradingview.com/x/dZNUtBOl/
https://www.tradingview.com/x/h3pLp04z/
https://www.tradingview.com/x/fPyVFO7v/
https://www.tradingview.com/x/BZcFGkQj/
https://www.tradingview.com/x/hsKZf5tu/
https://www.tradingview.com/x/25sNNP2Q/
https://www.tradingview.com/x/tCcdn6Wh/
https://www.tradingview.com/x/nlYsqqTO/
https://www.tradingview.com/x/tJmPgglu/
https://www.tradingview.com/x/wo14TtgW/
https://www.tradingview.com/x/emZ2LBqL/
https://www.tradingview.com/x/w0tmtPQK/
https://www.tradingview.com/x/fIMdsH7m/
https://www.tradingview.com/x/kF2htqgI/
https://www.tradingview.com/x/bXN54IhR/
https://www.tradingview.com/x/1rvCUWl7/
https://www.tradingview.com/x/TN7k6AaP/
https://i.hizliresim.com/dgow5jw.jpg
https://i.hizliresim.com/iuwdfrm.jpg
yirmiden fazla yan tahta tavanda.....yarısı on lira altı....
https://www.tradingview.com/x/EyvMtT6A/
https://www.tradingview.com/x/G6PjVhDQ/
https://www.tradingview.com/x/IFeNYMbY/
https://www.tradingview.com/x/M9WDfuOc/
https://www.tradingview.com/x/D9lDqsMK/
https://www.tradingview.com/x/GF2nwzbU/
https://www.tradingview.com/x/HWW6cYoE/
https://www.tradingview.com/x/8DF55aL7/
1 ağustos için takip edilecekler...
altın formül yok....baştan söyleyeyim....
ama kazanmak için gayret var.....gayrette önce ilimle olacak....
şu ana kadar birçok kodu inceledim.....farklı hesaplamaları gördüm....
en çok beğenilenlere baktım.....
sonuç....
hesaplama nasıl yapılırsa yapılsın....üç aşağı beş yukarı aynı.....
en çok beğendiğim kod ise.....kristal görünümlü kod.....
nedeni ters mühendislikle yazılmış olması ve açık olmasına rağmen.....
kırılamaması..... (eğer kırılsaydı içine çok ilginç strateji yazılabilirdi)
gelelim...bana...kod merakım.....psar kullanımıyla başladı....
o yüzden psarın yeri ayrı....
ve....nedim abiye....yani bıkmışbroker .....kesinlikle teşekkürü borç bilirim....
onun grafikleriyle....psar kullanımını öğrenip.....kendimi geliştirmeye başladım....
ve...şu ana kadar....incelediğim tüm psar kodlarının içinde....
sistemime en yakın olanı.....
budur..... https://tr.tradingview.com/v/0CsSz99w/
yazan kişi kodda....bizim gibi....hızlı orta ve yavaş psar kullanmış...
ayrıca....ortalamayla sinyal üretmiş....linreg ve devinasyonla....kanallar çizdirmiş....
şimdi....
hızlı hareket için metalar arasında....
yani döngülerde dolaşmak gerekir.....
bunun içinse tarama sistemi gerekir....
çünkü belirlenen meta....sisteminizde nasıl görüküyor anlarsınız.....
tarama için öncelikle.....
trw nin hisse takipçisi ekranında kendi belirlediğiniz parametreleri kullanabilirsiniz.....
https://tr.tradingview.com/chart/Mg4WFy0B/ örnekteki gibi......
ya da.... https://tr.tradingview.com/scripts/screener/ burdaki tarama kodlarından faydalanabilirsiniz.....
tarama işi önemli....
kodlarla bu iş yapılırken.....kombinasyonlar çok olur.....
tek bir koda tarama yapabileceğiniz gibi aynı kodum mtfsiyle....birden fazla kodla....
barın hareketiyle... v.b akla gelen çok değişik yöntemler olur.....
kısaca örnekleme yaparsak.....
https://tr.tradingview.com/script/Zt...RSI-ATR-Stoch/ bu kodla birden fazla indikatörle....
istediğiniz periyot için tararsınız....
https://tr.tradingview.com/script/qJ...s-v4-Screener/ bu kodda 24 metayı....bilinen 9 indikatörle...
pozitif veya negatif oluşlarına göre tarayabilirsiniz....
https://tr.tradingview.com/script/6p...ener-Multiple/ bu kodda 15 metayı....belirlenen indikatörlerle tararken....
https://tr.tradingview.com/script/xi...r-By-MUQWISHI/ bu kodla bar patern tararsınız...
kıvanç hocanın https://tr.tradingview.com/script/w5...rage-Screener/ bu koduyla 20 hisseyi most tararsınız...
https://tr.tradingview.com/script/0h...osite-tickers/ bunda ise 120 metayı....belirlenen indikatörlerin görmenizi sağlar.... biraz kasar ama...
https://tr.tradingview.com/script/f5...STICK-HEATMAP/ bunda ise her barın belirlediğiniz periyot için rsı adx macd gibi tarayıp barın al veya satta olduğunu görürsünüz....
https://tr.tradingview.com/script/I1...t-Charts-Anan/ bunda ise aynı metanın mtfsini alta koyarak görmenizi sağlar....
https://tr.tradingview.com/v/XR3rBEhd/ böylesinde ise trend taraması yani içine yazılmış stratejiye göre tarama yaparsınız...
ancak taramada önemli olan şey.....
kodun değerlerini göstermesi veya kodun sinyaline göre taraması değildir.....
kod belirlediğiniz metaları tararken.....https://tr.tradingview.com/v/17QnvRsR/ burda olduğu gibi hepsini göstermesi değil.....
aksine alarmlı olup....içinden koşulu sağlayanları göstermesidir....
diğer konu...
niçin başkasının koduyla tarama yapayım.....
kendi kullandığınız kodla... tarama yapmak istiyorsanız.....
yukardakilerini kullanarak...kendinize has hale getirebilirsiniz....
veya yapayzekadan yardım alarak kodu tekrardan düzenletebilirsiniz....
kodla tarama yapmak demek.....kodunuzun değerlerini görmek demek....
içine strateji yazdıysanız....sonucu görmek demek.....
kullanılan stratejiyle taramak....bunu alarmlı kullanmak ise daha güzeldir....
ekran sadeleşir.....strateji al verdiğinde....alarm çalışır...meta ekranda görülür...
sizde işleme başlayabilirsiniz....
gelelim kodlara....
hepsi emek verilerek yazılmış fikirler olduğu için.....
öncelikle teşekkür haklarıdır....
çünkü üzerinde geliştirme yapmak.... gelişimi hızlandırır.....
fikir paylaşımı.... kişinin rüşdünü ispattır.....
rüşdünü ispat eden...bencilleşmez aksine daha da..yapıcı olur....
trwde en çok fikir paylaşanlar....en çok takip edilenler.....
her kod güzel ama....
emeğe teşekküre eyvallah...
ancak....
kod teste sokulmadan....
yazan rüşdünü ispat etsede.... kod da rüşdünü ispat etmelidir....
bu yüzden....
normalde her koda ya strateji yazılmalı ya da içindeki strateji test edilmelidir....
test edilmeyen kodlar....çogu zaman yanıltıcı ve genellikle kaybettirir....
siz kod güzel diye...test etmeden....otomatiğe bağlarsanız....
ve btc gibi kaldıraçlı işlemlerde... marjincall sonucu sıfırlarsınız.....
örneğin
ve...şu ana kadar....incelediğim tüm psar kodlarının içinde....
sistemime en yakın olanı.....
budur..... https://tr.tradingview.com/v/0CsSz99w/
bu kodu kullanırsınız.... güzel ama....içindeki stratejiyi test edin...sonuca bakın.....
bunu otomatik kullanılacaksa....içine kendiniz strateji yazmalısınız ki.....
sonuçları görüp...nasıl kullanacağınızı anlamış olursunuz....
kod ve stratejiye örnek....
şimdi içinde sadece atr ve tek psar olan....5 günlük high low çizen kod.....
resimlerde kodun psara göre sinyali....
sonra içine yazılan strateji sinyali...ve sonucu....
https://i.hizliresim.com/s9oquhb.jpg
https://i.hizliresim.com/rf1ro7n.jpg
https://i.hizliresim.com/jagy55e.jpg
aslolan ise....
strateji testinde.....stratejinin hangi tarih aralığında....nasıl sonuç verdiğidir....
bakınız....
https://i.hizliresim.com/twhih9i.jpg
https://i.hizliresim.com/1c91tdf.jpg
https://i.hizliresim.com/qncdgtj.jpg
https://i.hizliresim.com/rhy7mr2.jpg
https://i.hizliresim.com/8yzspe8.jpg
tarih aralığına ve sonuçlara dikkat.....
bahsettiğim test bu....
1 dakkalıkta 14temmuz-1ağustos arası.... yüzde 26 karlı işlem yapan strateji....
günlükte....2021 temmuzdan bugüne... yüzde 23 civarı....
sanırım ne demek istediğimi anlatabildim....
yapay zeka kod yazdırma....
https://tr.tradingview.com/script/IAssyObN-MavilimW/ örnek bu kodu alalım....
geliştirmek için atr ile sapma sinyali hesaplatalım....
kodu
siz sapma değerini 4.5 yapın....böyle görülür......PHP Code:
//@version=4
study("MAVW + ATR Sapma Sinyali", overlay=true)
// === MAVW Hesabı ===
fmal = input(3)
smal = input(5)
tmal = fmal + smal
Fmal = smal + tmal
Ftmal = tmal + Fmal
Smal = Fmal + Ftmal
M1 = wma(close, fmal)
M2 = wma(M1, smal)
M3 = wma(M2, tmal)
M4 = wma(M3, Fmal)
M5 = wma(M4, Ftmal)
MAVW = wma(M5, Smal)
// === ATR Hesabı ===
atrLength = input(14, title="ATR Periyodu")
atrValue = atr(atrLength)
// === Sapma Oranı Hesabı ===
sapmaOrani = abs(close - MAVW) / atrValue
sapmaEsik = input(1.5, title="Sapma Eşiği (ATR katı)")
sapmaSinyali = sapmaOrani > sapmaEsik
// === MAVW Çizgisi Renkli ===
renk = MAVW > MAVW[1] ? color.blue : MAVW < MAVW[1] ? color.red : color.yellow
plot(MAVW, title="MAVW", color=renk, linewidth=2)
// === Sapma Sinyali (Turuncu Daire)
plotshape(sapmaSinyali ? 1 : na, title="Sapma Sinyali", location=location.abovebar, color=color.orange, style=shape.circle, size=size.small)
// === Alarm Koşulu
alertcondition(sapmaSinyali, title="Aşırı Sapma Alarmı", message="Fiyat MAVW'den çok uzaklaştı!")
https://www.tradingview.com/x/VvlVrRlO/
https://tr.tradingview.com/script/6W...ile-BigBeluga/
sadeleme....
https://www.tradingview.com/x/UuLisawv/PHP Code:
//@version=5
indicator("Deviation Trend Profile (Simplified)", overlay=true)
// Parametreler
len = input.int(50, title="SMA Length")
mult1 = input.int(1, title="SD1")
mult2 = input.int(2, title="SD2")
mult3 = input.int(3, title="SD3")
thresholdSlope = input.float(0.1, title="Slope Threshold")
sma = ta.sma(close, len)
atr = ta.atr(len)
// Sapma seviyeleri
sd1 = sma + atr * mult1
sd2 = sma + atr * mult2
sd3 = sma + atr * mult3
sd_1 = sma - atr * mult1
sd_2 = sma - atr * mult2
sd_3 = sma - atr * mult3
// SMA eğimi ve trend tanımı
slope = sma - sma[1]
inTrend = ta.change(slope) and math.abs(slope) > thresholdSlope
// Trend başlangıcı bul
var int startIdx = na
if inTrend and na(startIdx)
startIdx := bar_index
if not inTrend
startIdx := na
// Histogram bilgi: trend süresince fiyat pozisyon kategorisi
// Bu kısım detaylı histogram için genişletilebilir
// Çizim
plot(sma, "SMA", color=color.blue)
plot(sd1, "SD1", color=color.green)
plot(sd2, "SD2", color=color.teal)
plot(sd3, "SD3", color=color.lime)
plot(sd_1,"-SD1", color=color.orange)
plot(sd_2,"-SD2", color=color.red)
plot(sd_3,"-SD3", color=color.maroon)
// Trend başlangıcı göstergesi
plotshape(inTrend, location=location.top, style=shape.triangleup, color=color.yellow, title="Trend Start")
https://tr.tradingview.com/script/bw...vestorUnknown/
sadeleme.....
öncekiyle beraber görüntü https://www.tradingview.com/x/q6HOOaFG/PHP Code:
//@version=4
study("EMD Trend Basit v4", overlay=true)
// === Ayarlar ===
len = input(20, title="MA / EMD Length")
mult = input(1.5, title="EMD Multiplier")
// === MA ve EMD Hesapla ===
ma = sma(close, len)
// EMD ≈ EMA( |close - ma| )
emaDev = ema(abs(close - ma), len)
// Bantlar
upper = ma + emaDev * mult
lower = ma - emaDev * mult
// === Trend Yönü ===
longTrend = crossover(close, upper)
shortTrend = crossunder(close, lower)
// === Çizimler ===
plot(ma, title="MA", color=color.blue, linewidth=2)
plot(upper, title="Upper EMD", color=color.green, linewidth=1)
plot(lower, title="Lower EMD", color=color.red, linewidth=1)
// === Sinyaller ===
plotshape(longTrend, title="Long", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortTrend, title="Short", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// === Alarm Koşulları ===
alertcondition(longTrend, title="EMD LONG", message="Fiyat üst banda çıktı → LONG TREND")
alertcondition(shortTrend, title="EMD SHORT", message="Fiyat alt banda indi → SHORT TREND")
https://tr.tradingview.com/script/WL...st-SMA-Finder/
PHP Code:
//@version=4
study("Basit Best SMA Finder", overlay=true)
minLen = input(10, "Min SMA Length")
maxLen = input(100, "Max SMA Length")
bestSmaLen = minLen
bestCount = 0
var int bestLenVar = na
// Her SMA uzunluğu için kesişim sayısı kontrolü
for length = minLen to maxLen
smaVal = sma(close, length)
countLong = sum(crossover(close, smaVal) ? 1 : 0, length)
if (countLong > bestCount)
bestCount := countLong
bestLenVar := length
// Seçilen en iyi SMA çizim
bestSMA = sma(close, bestLenVar)
plot(bestSMA, color=color.blue, linewidth=2, title="Optimal SMA (" + tostring(bestLenVar) + ")")
// Fiyatın üzerine mi altına mı?
above = close > bestSMA
bgcolor(above ? color.new(color.green, 90) : color.new(color.red, 90), title="Trend Zone")
Kavram: Nedir “Best SMA Finder”?
Bu tip araçlar (ör. Best SMA Finder, Trend Scanner Pro gibi), farklı SMA uzunluklarını (ör. 10‑den 1000’e kadar) backtest eder, performansı ölçer (profit factor, trade sayısı, başarı oranı) ve en dayanıklı olan SMA’yı seçer
tradingview.com
+5
tradingview.com
+5
tradingview.com
+5
.
Sonuçta grafik üzerinde en optimal SMA değerini ve geçerli stratejiye göre fiyatın bu SMA ile ilişkisini gösterir.
bestLenVar: En çok kesişim (cross) üreten SMA uzunluğunu tespit eder
Grafik üzerinde bu SMA çizilir ve fiyatın üstünde/altında trend bölgesi renklendirilir
Kod sade, sıfır hata ile çalışır, Pine Script v4 uyumludur
https://tr.tradingview.com/script/vi...abres-LuxAlgo/
sadeleme...
PHP Code:
//@version=5
indicator("MA Sabres Basit v5", overlay=true)
// === MA Ayarları ===
maType = input.string("TEMA", "MA Tipi", options=["SMA","EMA","WMA","TEMA"])
length = input.int(50, "MA Uzunluğu")
count = input.int(20, "Trend Süre (Bar)")
atrLen = input.int(14, "ATR Süresi")
mult = input.float(1.5, "Sabre ATR Çarpanı")
maFn(x, len) =>
switch maType
"SMA" => ta.sma(x, len)
"EMA" => ta.ema(x, len)
"WMA" => ta.wma(x, len)
=> ta.ema(ta.ema(ta.ema(x, len), len), len) // TEMA
ma = maFn(close, length)
atr = ta.atr(atrLen)
isFalling = ta.falling(ma, count)
isRising = ta.rising(ma, count)
upTrend = isFalling[1] and ma > ma[1]
dnTrend = isRising[1] and ma < ma[1]
// Sabre çizimi için polyline
if upTrend or dnTrend
dir = upTrend ? 1 : -1
basePrice = dir == 1 ? low[1] : high[1]
startIdx = bar_index - 1
tipIdx = bar_index + length
tipPrice = basePrice + dir * atr * mult
pts = array.new<chart.point>()
array.push(pts, chart.point.from_index(startIdx, basePrice))
array.push(pts, chart.point.from_index(bar_index + length/2, basePrice + dir * atr * (mult/2)))
array.push(pts, chart.point.from_index(tipIdx, tipPrice))
polyline.new(pts, color = upTrend ? color.green : color.red, width = 2, style = line.style_curve, extend = extend.none)
// Trend onarımı için MA çizgisi
plot(ma, title="MA Trend", color=upTrend ? color.lime : dnTrend ? color.red : color.gray, linewidth=2)
// Sinyal şekli
plotshape(upTrend, location=location.belowbar, style=shape.circle, color=color.green, size=size.small)
plotshape(dnTrend, location=location.abovebar, style=shape.circle, color=color.red, size=size.small)
PHP Code:
//@version=4
study("MA Sabres v4 + BGColor", overlay=true)
// === Ayarlar ===
maLength = input(50, title="SMA Uzunluğu")
atrLength = input(14, title="ATR Periyodu")
mult = input(1.5, title="ATR Çarpanı")
// === Göstergeler ===
ma = sma(close, maLength)
atrVal = atr(atrLength)
// === Trend yönü kontrolü
maSlope = ma - ma[1]
upTrend = maSlope > 0 and maSlope[1] <= 0
dnTrend = maSlope < 0 and maSlope[1] >= 0
isUp = maSlope > 0
isDown = maSlope < 0
// === MA çizgisi
plot(ma, title="SMA", color=color.gray, linewidth=2)
// === Sabre işaretleme
plotshape(upTrend, title="Yukarı Sabre", location=location.belowbar, style=shape.triangleup,
color=color.lime, size=size.small, offset=-1)
plotshape(dnTrend, title="Aşağı Sabre", location=location.abovebar, style=shape.triangledown,
color=color.red, size=size.small, offset=-1)
// === Sabre hedef çizgileri (opsiyon
https://www.tradingview.com/x/aIJllXGF/
https://tr.tradingview.com/script/i4...n-Filter-Loxx/
https://www.tradingview.com/x/l7b0ZNPP/PHP Code:
//@version=4
study("Gaussian Filter with STD", overlay=true)
// === Ayarlar ===
length = input(20, title="Gaussian Filter Length")
poles = input(2, minval=1, maxval=4, title="Pole Sayısı")
stdMult = input(1.0, title="STD Çarpanı (Filtre)")
// === Kaynak
src = close
// === Gaussian Filter (N Pole)
gauss1 = ema(src, length)
gauss2 = poles >= 2 ? ema(gauss1, length) : gauss1
gauss3 = poles >= 3 ? ema(gauss2, length) : gauss2
gauss4 = poles >= 4 ? ema(gauss3, length) : gauss3
gaussian = gauss4
// === STD Hesabı ve Sapma
std = stdev(src, length)
diff = src - gaussian
longCond = diff > std * stdMult
shortCond = diff < -std * stdMult
// === Renkli Trend Çizgisi
trendColor = longCond ? color.green : shortCond ? color.red : color.gray
plot(gaussian, title="Gaussian Filter", color=trendColor, linewidth=2)
// === Sinyal Okları
plotshape(longCond, title="Al Sinyali", location=location.belowbar, style=shape.triangleup, color=color.green, size=size.small)
plotshape(shortCond, title="Sat Sinyali", location=location.abovebar, style=shape.triangledown, color=color.red, size=size.small)
https://tr.tradingview.com/script/4L...-nearest-rank/
PHP Code:
//@version=4
study("Yüzdelik Sıralama + Long/Short", overlay=true)
// === Ayarlar ===
length = input(50, title="Bakılacak Bar Sayısı")
percentileLevel = input(50, title="Orta Referans (%)") // örn: 50 medyan çizgisi
longLevel = input(10, title="Long Alt Sınır (%)") // %10 altı long
shortLevel = input(90, title="Short Üst Sınır (%)") // %90 üstü short
// === Kaynak verisi
src = close
// === En düşük ve en yüksek değerleri bul
lowestVal = lowest(src, length)
highestVal = highest(src, length)
// === Normalize et (0-1 arası)
range = highestVal - lowestVal
percentileNorm = range != 0 ? (src - lowestVal) / range : 0.5
percentilePct = percentileNorm * 100
// === Long / Short koşulları
longSignal = percentilePct < longLevel
shortSignal = percentilePct > shortLevel
// === Sinyal okları
plotshape(longSignal, location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, title="Long")
plotshape(shortSignal, location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, title="Short")
// === Yüzdelik çizgi
plot(percentilePct, title="Fiyat Yüzdelik (%)", color=color.blue, linewidth=2)
hline(percentileLevel, color=color.gray, title="Referans", linestyle=hline.style_dotted)
hline(longLevel, color=color.green, title="Long Seviyesi", linestyle=hline.style_dotted)
hline(shortLevel, color=color.red, title="Short Seviyesi", linestyle=hline.style_dotted)
// === Alarm koşulları
alertcondition(longSignal, title="AL Fırsatı", message="Yüzdelik konum: Long bölgesinde")
alertcondition(shortSignal, title="SAT Fırsatı", message="Yüzdelik konum: Short bölgesinde")
https://tr.tradingview.com/script/N8...nrose-Diagram/
sadeleme yapılıp hftalık kullanılırsa görüntü https://www.tradingview.com/x/G6mKXqG0/
PHP Code:
//@version=4
study("Penrose Diagram Basit v4", overlay=true)
// === Ayarlar ===
period = input(20, title="Dönem (gün/bar)")
extendLen = input(5, title="Uzunluk Yayılımı (bar)")
// === Oturum başlangıcı kontrolü
isNewSession = change(time("D")) != 0
// === Her yeni oturumda hesaplanan yüksek/düşük
var float sessHigh = na
var float sessLow = na
if isNewSession
sessHigh := highest(high, period)
sessLow := lowest(low, period)
// === Çizim uzatmaları
line.new(bar_index, sessHigh, bar_index + extendLen, sessHigh, color=color.blue, width=1, extend=extend.none)
line.new(bar_index, sessLow, bar_index + extendLen, sessLow, color=color.red, width=1, extend=extend.none)
https://tr.tradingview.com/script/Ct...d-Resistances/
https://www.tradingview.com/x/3O9DFS27/PHP Code:
//@version=4
study("Extrapolated Pivot S/R (v4)", overlay=true)
// === Ayarlar ===
leftBars = input(5, title="Pivot Left Bars")
rightBars = input(5, title="Pivot Right Bars")
projBars = input(20, title="Proj. Bars to the Right")
// === Pivot Noktaları ===
ph = pivothigh(leftBars, rightBars)
pl = pivotlow(leftBars, rightBars)
// === Destek/Direnç çizgileri oluştur ===
if not na(ph)
line.new(bar_index - rightBars, ph, bar_index + projBars, ph, color=color.red, style=line.style_solid, width=1)
if not na(pl)
line.new(bar_index - rightBars, pl, bar_index + projBars, pl, color=color.green, style=line.style_solid, width=1)
// === Görsel Sinyal Noktaları ===
plotshape(not na(ph), title="Pivot High", location=location.abovebar, style=shape.triangledown, color=color.red, size=size.small)
plotshape(not na(pl), title="Pivot Low", location=location.belowbar, style=shape.triangleup, color=color.green, size=size.small)
https://tr.tradingview.com/script/zVhoDQME/
https://www.tradingview.com/x/ksIPESRu/PHP Code:
//@version=4
study("OTT Trend Basit v4", overlay=true)
// === Parametreler ===
length = input(20, title="OTT Periyodu")
percent = input(1.4, title="OTT Percent (%)")
// === Temel Ortalama: EMA veya Seçilebilir MA
mma = ema(close, length)
// === OTT Stop Loss hesaplama (fiyat tepesi + percent)
offset = mma * percent / 100
longStop = mma - offset
shortStop = mma + offset
// === OTT çizgisi (stop line)
ott = close > mma ? longStop : shortStop
// === Trend Yönü ve Renk
inUpTrend = close > ott
inDownTrend = close < ott
ottColor = inUpTrend ? color.green : color.red
plot(ott, title="OTT Stop Line", color=ottColor, linewidth=2)
// === Sinyal Okları ===
plotshape(crossover(close, ott), title="Trend Yükseliyor", location=location.belowbar,
style=shape.triangleup, color=color.green, size=size.small)
plotshape(crossunder(close, ott), title="Trend Düşüyor", location=location.abovebar,
style=shape.triangledown, color=color.red, size=size.small)
// === Alarm Koşulları ===
alertcondition(crossover(close, ott), title="OTT LONG", message="Fiyat OTT çizgisini yukarı kırdı → Trend Yükselişi")
alertcondition(crossunder(close, ott), title="OTT SHORT", message="Fiyat OTT çizgisini aşağı kırdı → Trend Düşüşü")
yapay zeka ile kod yazdırma...sadeleme....strateji uygulayıp...test etme örnekleri vermiş olduk.....
tatil başlasın....
PHP Code:
//@version=4
indicator('3 SAR 60dk Üçü Eşit - 1dk Zemin Renklendirme', overlay = true)
// --- 60 DK SAR hesaplama ---
// Parametreler
sar1_step = input.float(0.02, 'SAR1 Step')
sar1_max = input.float(0.2, 'SAR1 Max')
sar2_step = input.float(0.04, 'SAR2 Step')
sar2_max = input.float(0.2, 'SAR2 Max')
sar3_step = input.float(0.06, 'SAR3 Step')
sar3_max = input.float(0.2, 'SAR3 Max')
// Tolerans (örnek: 0.1% -> 0.001)
tolerans = input.float(0.1, 'SAR Eşitlik Toleransı %') * 0.01
// 60dk timeframe
tf = '60'
// 60dk grafikte SAR hesaplama fonksiyonu
f_sar(_step, _max) =>
ta.sar(_step, _step, _max)
// 60dk grafikten 3 SAR serisi al
sar1_60 = request.security(syminfo.tickerid, tf, f_sar(sar1_step, sar1_max))
sar2_60 = request.security(syminfo.tickerid, tf, f_sar(sar2_step, sar2_max))
sar3_60 = request.security(syminfo.tickerid, tf, f_sar(sar3_step, sar3_max))
// 3 SAR birbirine yakın mı? (tolerans dahilinde)
sar12_close = math.abs(sar1_60 - sar2_60) <= close * tolerans
sar23_close = math.abs(sar2_60 - sar3_60) <= close * tolerans
sar13_close = math.abs(sar1_60 - sar3_60) <= close * tolerans
// Üçü de eşit olursa sinyal TRUE
sinyal_60 = sar12_close and sar23_close and sar13_close
// --- 1 DK GRAFİKTE ZEMİN RENKLENDİRME ---
bgcolor(sinyal_60 ? color.new(color.lime, 80) : na)
// --- İsteğe bağlı 1dk grafikte sinyal gösterimi ---
plotshape(sinyal_60, title = '60dk SAR 3 Eşit Sinyal', location = location.top, color = color.lime, style = shape.triangleup, size = size.small)
PHP Code:
//@version=4
indicator('..', overlay = true)
// Ayarlar
tol = input(0.0001, title = 'Eşitlik toleransı')
// 1dk en yakın SAR hesaplama fonksiyonu
f_nearestSar() =>
s1 = ta.sar(0.01, 0.02, 0.2)
s2 = ta.sar(0.02, 0.02, 0.2)
s3 = ta.sar(0.03, 0.02, 0.2)
s4 = ta.sar(0.04, 0.02, 0.2)
s5 = ta.sar(0.05, 0.02, 0.2)
d1 = math.abs(close - s1)
d2 = math.abs(close - s2)
d3 = math.abs(close - s3)
d4 = math.abs(close - s4)
d5 = math.abs(close - s5)
m = math.min(d1, math.min(d2, math.min(d3, math.min(d4, d5))))
nearest_1m = d1 == m ? s1 : d2 == m ? s2 : d3 == m ? s3 : d4 == m ? s4 : s5
nearest_1m
// 15dk sinyal hesaplama fonksiyonu
f_15m_signal() =>
nearest_1m_15 = f_nearestSar()
sar_5m_15 = request.security(syminfo.tickerid, '5', nearest_1m_15)
sar_15m_15 = request.security(syminfo.tickerid, '15', nearest_1m_15)
sar_avg_15 = (nearest_1m_15 + sar_5m_15 + sar_15m_15) / 3
longSig = ta.crossover(close, sar_avg_15)
shortSig = ta.crossunder(close, sar_avg_15)
[longSig, shortSig]
// 15dk sinyalleri 1dk grafikte al
[longSignal, shortSignal] = request.security(syminfo.tickerid, '15', f_15m_signal())
// 15dk sinyal bar indexlerini tutmak için değişkenler (persistent)
var int lastLongBarIndex = na
var int lastShortBarIndex = na
// 15dk sinyal oluştuğunda bar index güncelle
if longSignal
lastLongBarIndex := bar_index
lastLongBarIndex
if shortSignal
lastShortBarIndex := bar_index
lastShortBarIndex
// Son iki sinyalin bar indexlerini bul
// Burada örnek olarak lastLongBarIndex ve lastShortBarIndex'i karşılaştırıp renk vereceğiz
// Ama sen istediğin mantığa göre bunu değiştirebilirsin
// Eğer ikisi de var ise ve farklıysa zemin boya
bgcolor(not na(lastLongBarIndex) and not na(lastShortBarIndex) and bar_index >= math.min(lastLongBarIndex, lastShortBarIndex) and bar_index <= math.max(lastLongBarIndex, lastShortBarIndex) ? color.new(color.yellow, 80) : na)
// 1dk grafikte sinyalleri çiz (isteğe bağlı)
plotshape(longSignal, title = '15dk AL', style = shape.triangleup, location = location.belowbar, color = color.new(color.lime, 0), size = size.tiny)
plotshape(shortSignal, title = '15dk SAT', style = shape.triangledown, location = location.abovebar, color = color.new(color.red, 0), size = size.tiny)
///////////////////////