değer değişince...
farklı bakışlar...
https://i.hizliresim.com/t2riz2z.png
https://i.hizliresim.com/q3p280j.png
https://i.hizliresim.com/spglntf.png
https://i.hizliresim.com/ttiy710.png
Printable View
değer değişince...
farklı bakışlar...
https://i.hizliresim.com/t2riz2z.png
https://i.hizliresim.com/q3p280j.png
https://i.hizliresim.com/spglntf.png
https://i.hizliresim.com/ttiy710.png
aslında...bir ara...
sade bir şekilde...
tüm hisselerin...en yüksek gördüğü usd zirvesi....
ile...
şimdiki....gördüğü usd değeri...oranlasak....
acaba...aranılan...o malum hisse bulunur mu?....
örneğin petkmde gözüken...
https://i.hizliresim.com/emjl1cd.png
https://i.hizliresim.com/jhgzl7e.png
acaba 2021deki usd zirvesini test eder mi...
https://i.hizliresim.com/pmgw39a.png
2023 usd zirveyi test eder ama....2021 zirveyi test eder mi acaba....
Kolay gelsin yörük hocam güzel çalışmalar eline sağlık.:wave:
https://i.hizliresim.com/iayfhrz.png
son görüntü bu... risk arttı normalde....
haber olmadan...çanak düşünülemez.... çanak derinliği 60usd civarı ki...
bu arada ....teşekkürler.... Dandanakan hocam...
https://www.tradingview.com/x/qucbsLjL/ 50-35=15+50=65-42=23-babayaga=+5-5
https://www.tradingview.com/x/5b7HfNQ6/ aracı kurum çeyrek karlılık önerisinde olan...
yörük,karşıt babayaga...uvlow=0.60..reverse 0.82 to 0.72... ıf reverse...0.88+0.12=1
endekis...
günlükte 5 ekimden gelen....döngü....bar ihlali yapmış durumda...https://i.hizliresim.com/q73l6i0.png
bu yüzden...üst periyot haftalıkta durum....https://i.hizliresim.com/dystxkq.png
sarlar...haftalıkta...aynı değerle baskıda.....
usd...incelendiğinde ise....
https://i.hizliresim.com/tgpyo0j.png
https://i.hizliresim.com/riyebhu.png
https://i.hizliresim.com/67f3mz5.png
kısaca...haftalık bar ihlalinin olmaması ümit edilir....ancak....
zaman döngünün uzaması...ihtimal olabileceğinden...
üst periyot aylık göz önünde bulunmalıdır...
https://tr.tradingview.com/v/3YyxpZQt/
bişey paylaşırken...imza niyetine....
özlü söz paylaşımı gibi....:)
örnek.... https://www.tradingview.com/x/AqacuCIh/
ema kullanmayı sevenler için....https://tr.tradingview.com/v/vjwm1UCb/
tünelleme yapmış emalarla..... yüksek değerler kullanıldığı için...
en düşük periyot kullanımı daha mantıklı gibi...
örnek...https://www.tradingview.com/x/UyPkduD1/
https://www.tradingview.com/x/6WIu65He/ böyle daha sade....
https://tr.tradingview.com/v/mhl1Fgp1/
rosense hocanın topiğinde bahsettiği kod...
https://tr.tradingview.com/v/n0VutZMN/ kullanımı kolay saatlikte 20 uzunluk wma ve ema olarak incelenmeli....
üstteki iki kod birleştirilse böyle olacak...https://www.tradingview.com/x/DpgfhfVW/
https://tr.tradingview.com/v/md0PV7Yo/ kurgusu güzel....değerlerde oynama yapmak lazım...
yazılan kodlar....birleşince ortaya çıkan.... https://www.tradingview.com/x/Sxc4HTvB/
denemek isteyene....
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © vanAmsen
//@version=5
indicator(".", overlay = true)
atrPeriod = input.int(10, title="ATR Length", tooltip="Specifies the period over which the Average True Range (ATR) is calculated.", minval=1)
factor = input.float(9.9, title="Factor", tooltip="Multiplier factor for the ATR to define the distance of the Supertrend line from the price.", minval=0.1, step=0.1)
upColor = input.color(color.rgb(122,244,122), title="Up Color", tooltip="Color for the Supertrend line when the trend is upwards or bullish.")
downColor = input.color(color.rgb(244,122,122), title="Down Color", tooltip="Color for the Supertrend line when the trend is downwards or bearish.")
// Add switchers
showLabel = input.bool(true, title="Show Label", tooltip="Toggle to show or hide labels indicating statistical metrics like win rate and expected return.")
showTable = input.bool(false, title="Show Table", tooltip="Toggle to show or hide the interactive table summarizing key metrics.")
showLine = input.bool(false, title="Show Line", tooltip="Toggle to show or hide the Supertrend lines on the chart.")
[supertrend, direction] = ta.supertrend(factor, atrPeriod)
// Lists to store durations and percentage changes for up and down trends
var int[] durations_up_win = array.new_int(0)
var int[] durations_up_loss = array.new_int(0)
var int[] durations_down_win = array.new_int(0)
var int[] durations_down_loss = array.new_int(0)
var float[] pct_changes_up_win = array.new_float(0)
var float[] pct_changes_up_loss = array.new_float(0)
var float[] pct_changes_down_win = array.new_float(0)
var float[] pct_changes_down_loss = array.new_float(0)
// Additional arrays to store max running profit for uptrend and min running profit for downtrend
var float[] pct_changes_up_max = array.new_float(0)
var float[] pct_changes_down_min = array.new_float(0)
// Track the starting bar and price of the current trend
var int startBar = na
var float startPrice = na
// Track max running profit for uptrend and min running profit for downtrend
var float max_up = na
var float min_down = na
float pct_change = (close / startPrice) - 1
// Tracking max and min running profits for the current trend
if (direction[1] < 0) // Uptrend
max_up := math.max(nz(max_up), pct_change)
else
min_down := math.min(nz(min_down), pct_change)
if (direction != direction[1])
if (na(startBar) == false)
if (direction[1] < 0) // Uptrend
array.push(pct_changes_up_max, max_up)
if (pct_change > 0) // Win scenario for uptrend
array.push(pct_changes_up_win, pct_change)
array.push(durations_up_win, bar_index - startBar)
else // Loss scenario for uptrend
array.push(pct_changes_up_loss, pct_change)
array.push(durations_up_loss, bar_index - startBar)
else // Downtrend
array.push(pct_changes_down_min, min_down)
if (pct_change < 0) // Win scenario for downtrend
array.push(pct_changes_down_win, pct_change)
array.push(durations_down_win, bar_index - startBar)
else // Loss scenario for downtrend
array.push(pct_changes_down_loss, pct_change)
array.push(durations_down_loss, bar_index - startBar)
// Reset max and min values when the direction changes
max_up := na
min_down := na
// Start of new trend
startBar := bar_index
startPrice := close
// Calculate average durations for up and down trends
avg_duration_up_win = bar_index + array.avg(durations_up_win)
avg_duration_up_loss = bar_index + array.avg(durations_up_loss)
avg_duration_down_win = bar_index + array.avg(durations_down_win)
avg_duration_down_loss = bar_index + array.avg(durations_down_loss)
// Calculate average percentage changes for wins and losses
float avg_pct_change_up_win = array.avg(pct_changes_up_win)
float avg_pct_change_up_loss = array.avg(pct_changes_up_loss)
float avg_pct_change_down_win = array.avg(pct_changes_down_win)
float avg_pct_change_down_loss = array.avg(pct_changes_down_loss)
// Calculate the average max percentage change for uptrends and the average min percentage change for downtrends
float avg_max_pct_change_up = array.avg(pct_changes_up_max)
float avg_min_pct_change_down = array.avg(pct_changes_down_min)
avg_pct_up_win = close * (1 + avg_pct_change_up_win)
avg_pct_up_loss = close * (1 + avg_pct_change_up_loss)
avg_pct_down_win = close * (1 + avg_pct_change_down_win)
avg_pct_down_loss = close * (1 + avg_pct_change_down_loss)
// Calculate win rates
float win_rate_up = array.size(pct_changes_up_win) / (array.size(pct_changes_up_win) + array.size(pct_changes_up_loss))
float win_rate_down = array.size(pct_changes_down_win) / (array.size(pct_changes_down_win) + array.size(pct_changes_down_loss))
// Calculate expected returns
float expected_return_up = win_rate_up * avg_pct_change_up_win + (1 - win_rate_up) * avg_pct_change_up_loss
float expected_return_down = win_rate_down * avg_pct_change_down_win + (1 - win_rate_down) * avg_pct_change_down_loss
// Draw the lines for win and loss scenarios and display win rate and expected return
if (direction != direction[1])
label_text_up = "WR:" + str.tostring(win_rate_up * 100, "#.#") + "% / ER:" + str.tostring(expected_return_up * 100, "#.#") + "%\nEW:" + str.tostring(avg_pct_change_up_win * 100, "#.#") + "% / EL:" + str.tostring(avg_pct_change_up_loss * 100, "#.#") + "%"
label_text_down = "WR:" + str.tostring(win_rate_down * 100, "#.#") + "% / ER:" + str.tostring(expected_return_down * 100, "#.#") + "%\nEW:" + str.tostring(avg_pct_change_down_win * 100, "#.#") + "% / EL:" + str.tostring(avg_pct_change_down_loss * 100, "#.#") + "%"
if (direction < 0) // Uptrend
if showLine
line.new(x1=startBar, y1=startPrice, x2=avg_duration_up_win, y2=avg_pct_up_win, width=1, color=upColor, style=line.style_dashed)
line.new(x1=startBar, y1=startPrice, x2=avg_duration_up_loss, y2=avg_pct_up_loss, width=1, color=downColor, style=line.style_dashed)
if showLabel
// Add label for win rate, expected return, and average percentage changes
label.new(x=startBar, y=supertrend , text=label_text_up, style=label.style_label_up, color=upColor)
else // Downtrend
if showLine
line.new(x1=startBar, y1=startPrice, x2=avg_duration_down_win, y2=avg_pct_down_win, width=1, color=downColor, style=line.style_dashed)
line.new(x1=startBar, y1=startPrice, x2=avg_duration_down_loss, y2=avg_pct_down_loss, width=1, color=upColor, style=line.style_dashed)
if showLabel
// Add label for win rate, expected return, and average percentage changes
label.new(x=startBar, y=supertrend, text=label_text_down, style=label.style_label_down, color=downColor)
if showTable
// Create a table with 3 columns and 4 rows in the top right corner of the chart
var table t = table.new(position = position.top_right, columns = 3, rows = 4, bgcolor = color.new(color.gray, 90))
// Update the table data each bar with the latest metrics
// Define the text to be displayed in the cells
string wr_text_up = str.tostring(win_rate_up * 100, "#.#") + "%"
string er_text_up = str.tostring(expected_return_up * 100, "#.#") + "%"
string ew_text_up = str.tostring(avg_pct_change_up_win * 100, "#.#") + "%"
string el_text_up = str.tostring(avg_pct_change_up_loss * 100, "#.#") + "%"
string wr_text_down = str.tostring(win_rate_down * 100, "#.#") + "%"
string er_text_down = str.tostring(expected_return_down * 100, "#.#") + "%"
string ew_text_down = str.tostring(avg_pct_change_down_win * 100, "#.#") + "%"
string el_text_down = str.tostring(avg_pct_change_down_loss * 100, "#.#") + "%"
// Update the table every bar, so the table always displays the latest metrics
table.cell(t, 0, 0, "WR:", bgcolor=color.silver)
table.cell(t, 1, 0, wr_text_up, bgcolor=upColor)
table.cell(t, 2, 0, wr_text_down, bgcolor=downColor)
table.cell(t, 0, 1, "ER:", bgcolor=color.silver)
table.cell(t, 1, 1, er_text_up, bgcolor=upColor)
table.cell(t, 2, 1, er_text_down, bgcolor=downColor)
table.cell(t, 0, 2, "EW:", bgcolor=color.silver)
table.cell(t, 1, 2, ew_text_up, bgcolor=upColor)
table.cell(t, 2, 2, ew_text_down, bgcolor=downColor)
table.cell(t, 0, 3, "EL:", bgcolor=color.silver)
table.cell(t, 1, 3, el_text_up, bgcolor=upColor)
table.cell(t, 2, 3, el_text_down, bgcolor=downColor)
plot(direction < 0 ? supertrend : na, "Up Trend", color = upColor, style = plot.style_linebr)
plot(direction > 0 ? supertrend : na, "Down Trend", color = downColor, style = plot.style_linebr)
////
//@version=5
wicks = input(true, "Take Wicks into Account?")
highlightState = input(true, "Highlight State?")
ma(source, length, type) =>
type == "SMA" ? ta.sma(source, length) :
type == "EMA" ? ta.ema(source, length) :
type == "SMMA (RMA)" ? ta.rma(source, length) :
type == "WMA" ? ta.wma(source, length) :
type == "VWMA" ? ta.vwma(source, length) :
na
show_ma1 = input(true , "MA High", inline="MA #1", group="Channel №1")
ma1_type = input.string("SMA" , "" , inline="MA #1", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Channel №1")
ma1_source = input(high , "" , inline="MA #1", group="Channel №1")
ma1_length = input.int(50 , "" , inline="MA #1", minval=1, group="Channel №1")
ma1_color = input(color.green, "" , inline="MA #1", group="Channel №1")
ma1 = ta.ema(ma1_source, ma1_length)
show_ma2 = input(true , "MA Low", inline="MA #2", group="Channel №1")
ma2_type = input.string("SMA" , "" , inline="MA #2", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Channel №1")
ma2_source = input(low , "" , inline="MA #2", group="Channel №1")
ma2_length = input.int(200 , "" , inline="MA #2", minval=1, group="Channel №1")
ma2_color = input(color.red, "" , inline="MA #2", group="Channel №1")
ma2 = ta.ema(ma2_source, ma2_length)
showLabels1 = input(true, "Show Buy/Sell Labels?", group="Channel №1")
show_ma3 = input(true , "MA High", inline="MA #3", group="Channel №2")
ma3_type = input.string("WMA" , "" , inline="MA #3", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Channel №2")
ma3_source = input(high , "" , inline="MA #3", group="Channel №2")
ma3_length = input.int(50 , "" , inline="MA #3", minval=1, group="Channel №2")
ma3_color = input(color.orange, "" , inline="MA #3", group="Channel №2")
ma3 = ma(ma3_source, ma3_length, ma3_type)
show_ma4 = input(true , "MA Low", inline="MA #4", group="Channel №2")
ma4_type = input.string("WMA" , "" , inline="MA #4", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="Channel №2")
ma4_source = input(low , "" , inline="MA #4", group="Channel №2")
ma4_length = input.int(200 , "" , inline="MA #4", minval=1, group="Channel №2")
ma4_color = input(color.blue, "" , inline="MA #4", group="Channel №2")
ma4 = ma(ma4_source, ma4_length, ma4_type)
showLabels2 = input(true, "Show Buy/Sell Labels?", group="Channel №2")
Hlv1 = float(na)
Hlv1 := (wicks ? high : close) > ma1 ? 1 : (wicks ? low : close) < ma2 ? -1 : Hlv1[1]
sslUp1 = Hlv1 < 0 ? ma2 : ma1
sslDown1 = Hlv1 < 0 ? ma1 : ma2
Color1 = Hlv1 == 1 ? ma1_color : ma2_color
fillColor1 = highlightState ? (color.new(Color1, 90)) : na
highLine1 = plot(show_ma1 ? sslUp1 : na, title="UP", linewidth=2, color = Color1)
lowLine1 = plot(show_ma2 ? sslDown1 : na, title="DOWN", linewidth=2, color = Color1)
// Hide labels above MA
buySignal1 = show_ma1 and showLabels1 and Hlv1 == 1 and Hlv1[1] == -1
sellSignal1 = show_ma2 and showLabels1 and Hlv1 == -1 and Hlv1[1] == 1
plotshape(buySignal1 and close > ta.ema(close, 20), title="Buy Label", text="Buy", location=location.belowbar, style=shape.labelup, size=size.tiny, color=Color1, textcolor=color.white)
plotshape(sellSignal1 and close < ta.ema(close, 20), title="Sell Label", text="Sell", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=Color1, textcolor=color.white)
//fill(highLine1, lowLine1, color = fillColor1)
Hlv2 = float(na)
Hlv2 := (wicks ? high : close) > ma3 ? 1 : (wicks ? low : close) < ma4 ? -1 : Hlv2[1]
sslUp2 = Hlv2 < 0 ? ma4 : ma3
sslDown2 = Hlv2 < 0 ? ma3 : ma4
Color2 = Hlv2 == 1 ? ma3_color : ma4_color
fillColor2 = highlightState ? (color.new(Color2, 90)) : na
highLine2 = plot(show_ma3 ? sslUp2 : na, title="UP", linewidth=2, color = Color2)
lowLine2 = plot(show_ma4 ? sslDown2 : na, title="DOWN", linewidth=2, color = Color2)
// Hide labels below MA
buySignal2 = show_ma3 and showLabels2 and Hlv2 == 1 and Hlv2[1] == -1
sellSignal2 = show_ma4 and showLabels2 and Hlv2 == -1 and Hlv2[1] == 1
plotshape(buySignal2 and close < ta.ema(close, 200), title="Buy Label", text="Buy", location=location.belowbar, style=shape.labelup, size=size.tiny, color=Color2, textcolor=color.white)
plotshape(sellSignal2 and close > ta.ema(close, 200), title="Sell Label", text="Sell", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=Color2, textcolor=color.white)
//fill(highLine2, lowLine2, color = fillColor2)
////
//@version=5
/////////GENIAL LINE
mostrarGenial = input(true, title='Mostrar genial line')
src = input(close)
genial = input(32, title='32')
pgenial = ta.sma(src, genial)
genialplot = plot(mostrarGenial ? pgenial : na, color=color.rgb(3, 68, 247), style=plot.style_cross, ****=false, linewidth=2, title='32')
/////////FIN GENIAL LINE
//////ZONA DE CORRECION
ema8 = ta.ema(src, input(8,title='8'))
///////WILDER 8
f_wwma(l, p) =>
wwma = 0.
wwma := (nz(wwma[1]) * (l - 1) + p) / l
wilder8 = f_wwma(8, close)
// ///// FIN WILDER 8
fill_color = ema8> wilder8 ? color.new(#09ee11, 100) : color.new(#f70202, 100)
plotema8 = plot(ema8,color=fill_color, linewidth=1,title='8')
plotwilder8 = plot(wilder8,color=color.rgb(252, 248, 3), linewidth=1,style=plot.style_circles,title='8')
// ////// Colorear el fondo entre las EMAs
//fill(plotema8,plotwilder8,color=fill_color,title ='TUNEL DE CORRECCION',editable = true)
///////FIN ZONA DE CORRECION
/////TUNEL DOMENEC
ema123 = input(123,title='EMA-123')
ema188 = input(188,title='EMA-188')
ema416 = input(416,title='EMA-416')
ema618 = input(618,title='EMA-618')
ema882 = input(882,title='EMA-882')
ema1223 = input(1223,title='EMA-1223')
pema123 = ta.ema(src, ema123)
pema188 = ta.ema(src, ema188)
pema416 = ta.ema(src, ema416)
pema618 = ta.ema(src, ema618)
pema882 = ta.ema(src, ema882)
pema1223 = ta.ema(src, ema1223)
//cinta1 = plot(pema123,title='EMA-123 TUNEL 1',color=color.blue, linewidth=1,editable = true)
//cinta1_1 = plot(pema188,title='EMA 188 TUNEL 1',color=color.blue, linewidth=1,editable = true)
//cinta2 = plot(pema416,title='EMA-416 TUNEL 2',color=color.yellow, linewidth=1,editable = true)
//cinta2_1 = plot(pema618,title='EMA 618 TUNEL 2',color=color.yellow, linewidth=1,editable = true)
//cinta3 = plot(pema882,title='EMA-882 TUNEL 3', color=#FF1493, linewidth=1,editable = true)
//cinta3_1 = plot(pema1223,title='EMA 1223 TUNEL 3', color=#FF1493, linewidth=1,editable = true)
//fill(cinta1,cinta1_1,color.new(color.blue,transp = 75),title='COLOR TUNEL 1', editable=true)
//fill(cinta2,cinta2_1,color.new(color.yellow,transp=75),title='COLOR TUNEL 2', editable=true)
//fill(cinta3,cinta3_1,color.new(color=#FF1493, transp=75),title='COLOR TUNEL 3', editable=true)
//////FIN TUNEL DOMENEC
https://tr.tradingview.com/script/fxfvw13G/ örnek...https://www.tradingview.com/x/bbjULpmk/ stil ayarından tüm çizgileri kaldırılmış....sadece label sinyaller bırakılmış hali....
bu da diğer komutları.... https://tr.tradingview.com/u/bistati...lished-scripts
https://tr.tradingview.com/script/gR...icks-Dont-Lie/
ilginç hesaplaması var ama....bist bakıldığında....https://www.tradingview.com/x/ffP8caJX/
kod hesaplamalarında oynama yapılması gerekir....yoksa anlamsız....
https://tr.tradingview.com/script/5i...mic-Sine-Wave/
örnek yinelenmiş 5-20 uzunluktur...
https://www.tradingview.com/x/0KbEtsyF/ kullanırken...
örneğin...20 uzunluktaki kırmızının...tabanının 7200 ler olduğunu... düşünün....
değerleri değiştirerek...bu tarz bir kullanım olabilir...
https://tr.tradingview.com/script/Au...TrendDetector/ fractallı trend takip....
https://www.tradingview.com/x/L0drUDdN/
https://tr.tradingview.com/script/vE...Lines-LuxAlgo/
trend çizgileri çekmek için....
https://tr.tradingview.com/script/IL...els-DeltaAlgo/
kanalla trend takibi için...
https://tr.tradingview.com/script/Wr...RangeDetector/ bu da range... beraber haline örnek...
https://www.tradingview.com/x/dZtzPut8/
bu kodlardan...
şöyle bir birleştirme yapılabilir....
https://www.tradingview.com/x/sagU5ULD/
denemek isteyene kodu...
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © PhantomFlow_s666ex_
//@version=5
indicator("..", "...", true, max_lines_count = 500)
type fractal
int fractal_bar
box bx
type wave
bool isActive
bool isSearchCountertrendFormation
bool isSearchTrendFormation
int bar_start
int bar_end
float high_price
float low_price
array<line> lines
var array<wave> waves_down = array.new<wave>()
var array<wave> waves_up = array.new<wave>()
var array<int> fractals_down_zigzag = array.new<int>()
var array<int> fractals_up_zigzag = array.new<int>()
var array<bool> listFractals = array.new<bool>()
var array<fractal> LevelsShort = array.new<fractal>()
var array<fractal> LevelsLong = array.new<fractal>()
var array<fractal> LevelsShortHTF = array.new<fractal>()
var array<fractal> LevelsLongHTF = array.new<fractal>()
var array<int> levelsToCoef = array.new<int>()
ltf = timeframe.period
up_trend_start = input.color(title='Low', defval = color.rgb(255, 253, 106), group="Up Trend Power", inline = "up_trend")
up_trend_end = input.color(title='High', defval = color.rgb(0, 255, 0), group="Up Trend Power", inline = "up_trend")
down_trend_start = input.color(title='Low', defval = color.rgb(255, 89, 255), group="Down Trend Power", inline = "down_trend")
down_trend_end = input.color(title='High', defval = color.rgb(255, 0, 0), group="Down Trend Power", inline = "down_trend")
n_zigzag = 2
is_down_fractal_zigzag() =>
bool isConfirmFractal = false
for i = 0 to n_zigzag + n_zigzag
if low[n_zigzag] > low[i]
break
if (i == n_zigzag + n_zigzag)
isConfirmFractal := true
isConfirmFractal
is_up_fractal_zigzag() =>
bool isConfirmFractal = false
for i = 0 to n_zigzag + n_zigzag
if high[n_zigzag] < high[i]
break
if (i == n_zigzag + n_zigzag)
isConfirmFractal := true
isConfirmFractal
check_is_add_up_liquidity() =>
if array.size(fractals_up_zigzag) > 2
item1 = array.last(fractals_up_zigzag)
item2 = array.get(fractals_up_zigzag, array.size(fractals_up_zigzag) - 2)
item3 = array.get(fractals_up_zigzag, array.size(fractals_up_zigzag) - 3)
if (high[bar_index - item1] < high[bar_index - item2] and high[bar_index - item2] < high[bar_index - item3])
if array.size(waves_up) == 0
array.push(waves_up, wave.new(true, true, true, item3, item1, high[bar_index - item3], high[bar_index - item1], array.new<line>()))
true
else
wave last_wave = array.last(waves_up)
if (item3 >= last_wave.bar_start and item3 < last_wave.bar_end)
last_wave.bar_end := item1
last_wave.low_price := high[bar_index - item1]
last_wave.isActive := false
true
else
array.push(waves_up, wave.new(true, true, true, item3, item1, high[bar_index - item3], high[bar_index - item1], array.new<line>()))
true
check_is_add_down_liquidity() =>
if array.size(fractals_down_zigzag) > 2
item1 = array.last(fractals_down_zigzag)
item2 = array.get(fractals_down_zigzag, array.size(fractals_down_zigzag) - 2)
item3 = array.get(fractals_down_zigzag, array.size(fractals_down_zigzag) - 3)
if (low[bar_index - item1] > low[bar_index - item2] and low[bar_index - item2] > low[bar_index - item3])
if array.size(waves_down) == 0
array.push(waves_down, wave.new(true, true, true, item3, item1, low[bar_index - item1], low[bar_index - item3], array.new<line>()))
true
else
wave last_wave = array.last(waves_down)
if (item3 >= last_wave.bar_start and item3 < last_wave.bar_end)
last_wave.bar_end := item1
last_wave.high_price := low[bar_index - item1]
last_wave.isActive := false
true
else
array.push(waves_down, wave.new(true, true, true, item3, item1, low[bar_index - item1], low[bar_index - item3], array.new<line>()))
true
bool is_search_fractal_zigzag = bar_index - n_zigzag * 2 >= 0
if is_search_fractal_zigzag and true
if is_up_fractal_zigzag()
if array.size(fractals_up_zigzag) == 0
array.push(fractals_up_zigzag, bar_index - (n_zigzag))
array.push(listFractals, true)
else
isUpLastFractal = array.last(listFractals)
lastFractal = array.last(fractals_up_zigzag)
if isUpLastFractal and high[bar_index - lastFractal] < high[n_zigzag]
array.pop(fractals_up_zigzag)
array.push(fractals_up_zigzag, bar_index - (n_zigzag))
check_is_add_up_liquidity()
if not isUpLastFractal
lastFractalDown = array.last(fractals_down_zigzag)
if (low[bar_index - lastFractalDown] < high[n_zigzag])
array.push(fractals_up_zigzag, bar_index - (n_zigzag))
array.push(listFractals, true)
check_is_add_up_liquidity()
if is_down_fractal_zigzag()
if array.size(fractals_down_zigzag) == 0
array.push(fractals_down_zigzag, bar_index - (n_zigzag))
array.push(listFractals, false)
else
isUpLastFractal = array.last(listFractals)
lastFractal = array.last(fractals_down_zigzag)
if not isUpLastFractal and low[bar_index - lastFractal] > low[n_zigzag]
array.pop(fractals_down_zigzag)
array.push(fractals_down_zigzag, bar_index - (n_zigzag))
check_is_add_down_liquidity()
if isUpLastFractal
lastFractalUp = array.last(fractals_up_zigzag)
if (high[bar_index - lastFractalUp] > low[n_zigzag])
array.push(fractals_down_zigzag, bar_index - (n_zigzag))
array.push(listFractals, false)
check_is_add_down_liquidity()
bool isDownTrend = false
bool isUpTrend = false
var float last_low = na
var float last_high = na
if (array.size(waves_up) != 0 and array.size(waves_down) != 0)
wave lastWaveUp = array.last(waves_up)
wave lastWaveDown = array.last(waves_down)
if (close < lastWaveDown.high_price and close > lastWaveUp.low_price)
if (lastWaveDown.bar_end < lastWaveUp.bar_end)
isUpTrend := true
last_low := lastWaveUp.low_price
last_high := lastWaveUp.high_price
else
isDownTrend := true
last_low := lastWaveDown.low_price
last_high := lastWaveDown.high_price
if (close >= lastWaveDown.high_price and close > lastWaveUp.low_price)
isUpTrend := true
last_low := lastWaveUp.low_price
last_high := lastWaveUp.high_price
if (close < lastWaveDown.high_price and close <= lastWaveUp.low_price)
isDownTrend := true
last_low := lastWaveDown.low_price
last_high := lastWaveDown.high_price
if (array.size(waves_up) != 0 and array.size(waves_down) == 0)
wave lastWave = array.last(waves_up)
if (close > lastWave.low_price)
isUpTrend := true
last_low := lastWave.low_price
last_high := lastWave.high_price
if (array.size(waves_down) != 0 and array.size(waves_up) == 0)
wave lastWave = array.last(waves_down)
if (close < lastWave.high_price)
isDownTrend := true
last_low := lastWave.low_price
last_high := lastWave.high_price
var color trend_css = na
float signal = ta.ema(close, 1)
color signalColorDown = color.from_gradient(signal, last_low, last_high, up_trend_start, up_trend_end)
color signalColorUp = color.from_gradient(signal, last_low, last_high, down_trend_end, down_trend_start)
if isDownTrend
trend_css := signalColorUp
if isUpTrend
trend_css := signalColorDown
plotcandle(open, high, low, close
, color = trend_css
, wickcolor = trend_css
, bordercolor = trend_css
, editable = false
, display = display.pane)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mxrshxl_trxde
//@version=5
n = input.int(2, title='Min. bars for range')
coefZone = 4
// all_color = input.color(title='All colors', defval = color.rgb(0, 255, 234, 80), group="Visual Settings", inline = 'bg_ltf_color_liquidity')
color_up = input.color(title='Background UP', defval = color.rgb(255, 0, 0, 20), group="Visual Settings", inline = 'bg_ltf_color_liquidity')
color_down = input.color(title='Background DOWN', defval = color.rgb(0, 255, 0, 20), group="Visual Settings", inline = 'bg_ltf_color_liquidity')
// color_up_setup = input.color(title='Background UP Setup', defval = color.rgb(255, 0, 234, 80), group="Visual Settings", inline = 'bg_ltff_color_liquidity')
// color_down_setup = input.color(title='Background DOWN Setup', defval = color.rgb(0, 225, 255, 80), group="Visual Settings", inline = 'bg_ltff_color_liquidity')
type zone
int startBar
int endBar
float priceHigh
float priceLow
bool isChained
bool isDropZone
bool isActive
bool isBuildZone
string typeSort
box bx
bool isSetup
var array<zone> zones_all = array.new<zone>()
var array<zone> chain_zones_all = array.new<zone>()
var array<float> sized_zones = array.new<float>()
if (array.size(zones_all) != 0)
zone lastZone = array.last(zones_all)
if lastZone.priceLow > close or lastZone.priceHigh < close
if (lastZone.endBar - lastZone.startBar != 1 and lastZone.endBar - lastZone.startBar >= n and not lastZone.isDropZone)
lastZone.isChained := true
array.push(sized_zones, lastZone.priceHigh - lastZone.priceLow)
if (array.size(sized_zones) > 5)
array.shift(sized_zones)
else
if not na(lastZone.bx)
box.delete(lastZone.bx)
array.remove(zones_all, array.indexof(zones_all, lastZone))
if high[1] >= close and high[1] >= open and low[1] <= close and low[1] <= open
isContinous = true
if (array.size(zones_all) != 0)
zone lastZone = array.last(zones_all)
if not lastZone.isChained
if lastZone.priceHigh >= close and lastZone.priceHigh >= close[1] and lastZone.priceHigh >= open and lastZone.priceHigh >= open[1] and lastZone.priceLow <= close and lastZone.priceLow <= close[1] and lastZone.priceLow <= open and lastZone.priceLow <= open[1]
lastZone.endBar := bar_index
isContinous := false
if not na(lastZone.bx)
box.delete(lastZone.bx)
// lastZone.bx := box.new(lastZone.startBar, lastZone.priceHigh, lastZone.endBar, lastZone.priceLow, border_color = all_color, bgcolor = all_color)
else
if lastZone.endBar - lastZone.startBar == 1 or lastZone.endBar - lastZone.startBar < n
if not na(lastZone.bx)
box.delete(lastZone.bx)
array.remove(zones_all, array.indexof(zones_all, lastZone))
else
lastZone.isChained := true
array.push(sized_zones, lastZone.priceHigh - lastZone.priceLow)
if (array.size(sized_zones) > 5)
array.shift(sized_zones)
if lastZone.isChained and not lastZone.isBuildZone
lastZone.isDropZone := true
if not na(lastZone.bx)
box.delete(lastZone.bx)
if array.size(sized_zones) != 0 and isContinous
if (high[1] - low[1]) / array.avg(sized_zones) > coefZone
array.push(sized_zones, high[1] - low[1])
if (array.size(sized_zones) > 5)
array.shift(sized_zones)
isContinous := false
else
array.push(zones_all, zone.new(bar_index - 1, bar_index, high[1], low[1], false, false, false, false, na, na, false))
if array.size(sized_zones) == 0 and isContinous
array.push(zones_all, zone.new(bar_index - 1, bar_index, high[1], low[1], false, false, false, false, na, na, false))
if array.size(zones_all) != 0
zone lastZone = array.last(zones_all)
if not lastZone.isChained and array.size(zones_all) > 1
lastZone := array.get(zones_all, array.size(zones_all) - 2)
if lastZone.isChained and not lastZone.isBuildZone and not lastZone.isDropZone
if high > lastZone.priceHigh and close > lastZone.priceHigh
if lastZone.endBar - lastZone.startBar >= n
lastZone.isBuildZone := true
lastZone.isActive := true
lastZone.typeSort := 'long'
array.push(chain_zones_all, lastZone)
if not na(lastZone.bx)
box.delete(lastZone.bx)
lastZone.bx := box.new(lastZone.startBar, lastZone.priceHigh, lastZone.endBar, lastZone.priceLow, border_color = color_down, bgcolor = color_down)
else
lastZone.isDropZone := true
if not na(lastZone.bx)
box.delete(lastZone.bx)
if low < lastZone.priceLow and close < lastZone.priceLow
if lastZone.endBar - lastZone.startBar >= n
lastZone.isBuildZone := true
lastZone.isActive := true
lastZone.typeSort := 'short'
array.push(chain_zones_all, lastZone)
if not na(lastZone.bx)
box.delete(lastZone.bx)
lastZone.bx := box.new(lastZone.startBar, lastZone.priceHigh, lastZone.endBar, lastZone.priceLow, border_color = color_up, bgcolor = color_up)
else
lastZone.isDropZone := true
if not na(lastZone.bx)
box.delete(lastZone.bx)
// if array.size(zones_all) > 2
// zone lastZone = array.last(zones_all)
// zone prevZone = array.get(zones_all, array.size(zones_all) - 2)
// zone prevPrevZone = array.get(zones_all, array.size(zones_all) - 3)
// if lastZone.isBuildZone and prevZone.isBuildZone and prevPrevZone.isBuildZone
// if lastZone.typeSort == "short" and prevZone.typeSort == "short" and prevPrevZone.typeSort == "long"
// if prevPrevZone.priceHigh >= prevZone.priceLow and prevPrevZone.priceHigh < prevZone.priceHigh and lastZone.priceHigh >= prevZone.priceLow and lastZone.priceHigh < prevZone.priceHigh
// lastZone.isSetup := true
// if not na(lastZone.bx)
// box.delete(lastZone.bx)
// lastZone.bx := box.new(lastZone.startBar, lastZone.priceHigh, lastZone.endBar, lastZone.priceLow, border_color = color_up_setup, bgcolor = color_up_setup)
// if lastZone.typeSort == "long" and prevZone.typeSort == "long" and prevPrevZone.typeSort == "short"
// if prevPrevZone.priceLow <= prevZone.priceHigh and prevPrevZone.priceLow > prevZone.priceLow and lastZone.priceLow <= prevZone.priceHigh and lastZone.priceLow > prevZone.priceLow
// lastZone.isSetup := true
// if not na(lastZone.bx)
// box.delete(lastZone.bx)
// lastZone.bx := box.new(lastZone.startBar, lastZone.priceHigh, lastZone.endBar, lastZone.priceLow, border_color = color_down_setup, bgcolor = color_down_setup)
// © DraftVenture
//@version=5
// User-defined inputs
length = input(20, "Period")
// Calculate highest and lowest points
highestHigh = ta.highest(high, length)
lowestLow = ta.lowest(low, length)
// Get bars since high and low
barsSinceHigh = ta.barssince(high == highestHigh)
barsSinceLow = ta.barssince(low == lowestLow)
// Calculate the sine wave using highest and lowest points
x = bar_index - ta.min(bar_index)
omega = 2 * math.pi / length
sineLine = math.sin(omega * x) * (highestHigh - lowestLow) / 2 + (highestHigh + lowestLow) / 2
// Plotting
plot(sineLine, color=color.white)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © DeltaAlgo
//@version=5
// user inputs
length22 = input.int(6, "Length", 2, 999, 1, inline = "tgc", group = "trend gaussian channel settings")
mult22 = input.float(3, "", 1, 5, 0.01, "Top & Bottom Band Multiplier", "tgc", "trend gaussian channel settings")
barcol22 = input.bool(false, "Bar Colors", "Toggle On/Off Candle Colors", group = "candle color settings")
signal22 = input.bool(true, "Trend Shift Signals", "Toggle On/Off Trend Signals When Trend Shifts", group = "candle color settings")
// gaussian channel
guassianBasis(float source, int length22, float mult22) =>
basis = ta.ema(ta.hma(ta.sma(source, length22), length22 * 2), length22 /2)
topBand = basis + (ta.atr(105) * (mult22 * 1.005))
lowBand = basis - (ta.atr(105) / (mult22 / 1.005))
[basis, topBand, lowBand]
[base, upper, lower] = guassianBasis(close, length22, mult22)
upward = base < high
dnward = base > low
basePlot = plot(base, "Base", upward ? color.new(#00cf4b, 15) : color.new(#ff5252, 15), 2)
upperPlot = plot(upper, "Upper", upward ? color.new(#00cf4b, 20) : color.new(#ff5252, 20), 2)
lowerPlot = plot(lower, "Lower", upward ? color.new(#00cf4b, 20) : color.new(#ff5252, 20), 2)
//fill(upperPlot, lowerPlot, upward ? color.new(#00cf4b, 80) : color.new(#ff0000, 80), "Channel Fill")
// barcolor
uptrend = color.from_gradient(ta.rsi(close, 15), 25, 76, #67248f, #00cf4b)
ranging = color.from_gradient(ta.rsi(close, 15), 30, 75, #63726f, #67248f)
dntrend = color.from_gradient(ta.rsi(close, 15), 8, 82, #ff0000, #67248f)
//barcolor(barcol22 ? high > upper ? uptrend : high < upper and high > lower ? ranging : dntrend : na)
// signals
upSignalCondition = high > upper and ta.crossover(low, upper)
dnSignalCondition = low < lower and ta.crossunder(high, lower)
plotshape(signal22 and upSignalCondition, "Bullish Signal", shape.labelup, location.belowbar, color.new(#00cf4b, 35), size = size.small)
plotshape(signal22 and dnSignalCondition, "Bearish Signal", shape.labeldown, location.abovebar, color.new(#ff0000, 35), size = size.small)
https://i.hizliresim.com/3gz8s0o.png
şampiyon fenerim...:)...yarın bi 15 dakkalık yoklama yapar mı...acaba...
Tradingview Kodlama Bilmeyenlere Müjde!
🎈 Hiç kod yazmadan bu aracı grafiğinize ekleyerek stratejinizi kurgulayabilir ve test edebilirsiniz.
🎈 Kâr Al, Zarar Durdur, Takip Eden Zarar Durdur ekleyebilirsiniz.
🎈 İster Vadeli ister Spot piyasalar için strateji kurgulayabilirsiniz.
🎈 Stratejinizi istediğiniz tarih aralığında çalıştırabilirsiniz.
🎈 Bir çok indikatöre göre (ve/veya) bağlaçları ile stratejiler kurgulayabilirsiniz.
Detaylı bilgi için : https://algotrade.dev/kod-yazmadan-strateji-tasarla/
Strategy Designer : https://tr.tradingview.com/script/Hp05f5Dq/
bugün iyi dayak yedim:(
aşırı risk=teknik bilgi+enfalasyon muhasebesi+sığlık+düşük işlem hacmi+ceza
normal risk=teknik bilgi+enfalasyon muhasebesi+derinlik+yüksek işlem hacmi
https://i.hizliresim.com/8bgopmg.png
sinus...
5 dakkalık...https://www.tradingview.com/x/KFaNHpjd/
vadeli...15 dakka...https://www.tradingview.com/x/bMjIDdQb/