-
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
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ı!")
siz sapma değerini 4.5 yapın....böyle görülür......
https://www.tradingview.com/x/VvlVrRlO/
-
-
https://tr.tradingview.com/script/6W...ile-BigBeluga/
sadeleme....
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://www.tradingview.com/x/UuLisawv/
-
https://tr.tradingview.com/script/bw...vestorUnknown/
sadeleme.....
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")
öncekiyle beraber görüntü https://www.tradingview.com/x/q6HOOaFG/
-
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/
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://www.tradingview.com/x/l7b0ZNPP/