Özelden yazdım.
Printable View
https://www.tradingview.com/x/cZIjL1Ud/
fiyat....turuncuyu yukarı kestiğinde....
yeni bir döngü başlayacak.....
yani bofa veya info...denizden gelcek.....
canı istedikleri gün tavan çekecekler.....
aynı....15ocak...22ocak...5şubat...günlerinde olan barlar gibi.....
eğer böyle olursa.....çoğu kişinin hedefi olan dört harfliler olur....:drunk:
bu arada...mia...niye böyle işlem hacmi oluyor....temelde ne var.....
bofacık...reedr kaldırmış bugün.....onu satınca...hemen buraya uğramasın...:drunk:
babamın...2.tur....5.kür...kemoterapide bugün bitti....
house...dizisinin sonundaki replik misali....
cancer.....is boring...........
bol nasipleriniz olsun.....selamlar....
https://www.tradingview.com/x/BScmHFgJ/ saatliğin aktifleşmesi için....
https://www.tradingview.com/x/odicHNvc/ 15likteki fuşya indirilmeli....
https://www.tradingview.com/x/wfMdwJnN/ bunun içinde 5 dakkalık momentum pozitif olmalı...
https://www.tradingview.com/x/NsIOWfVY/ bu da bir dakkalık...
https://tr.tradingview.com/script/Zx...s-Flux-Charts/
bar hesaplaması içeren bir kod....
bu şirket hiç spek hisseler gibi toplandıktan sonra tavan üstüne tavan gitmedi, sürekli yeni maliyetler yapılarak ilerledi hisse.
ancak geçenlerde de dediğim gibi 13 şubatta 62xteki gap kapandığı gün biraz mal ky'ye verilmiş gibi. düşüşün yavaşlayıp en geç 29 şubatta tekrar yükselişe başlayacağını düşünüyorum.
Hisse kama,dan çıkamadı,indikatör de öptü ama kesemedi,ancak günlerden sonra yeşil mum yakması olumlu.
Yarın önemli,düşüşün sonlarında gibi görünüyor.
Allah, senden razı olsun. Sayın, Majesty23....
İyi dileğinize istinaden....Çam sakızı çoban armağanı.....Küçük bir hediyem olsun size....
Belki denersiniz....Daha da geliştirirsiniz.....Kombine bir kod birleştirme çalışması....
https://tr.tradingview.com/scripts/?sort=recent buradan...İlk on sayfa içinden...
Beğendiklerimden sizin için derlendi....
örnek görüntüler....PHP Code:
//@version=5
const bool DEBUG = false
const int maxBoxesCount = 500
const int showLastXLiqs = 500
const int maxDistanceToLastBar = 1000 // Affects Running Time
indicator("Majesty23",overlay=true, max_boxes_count = maxBoxesCount, max_labels_count = maxBoxesCount, max_lines_count = maxBoxesCount, max_bars_back = 1000)
pivotLenLiq = input.int(20, "Pivot Length", group = "General Configuration", display = display.none)
WBR = input.float(0.5, "Wick-Body Ratio", step = 0.1, group = "General Configuration", display = display.none)
sellsideColor = input(#08998180, 'Bullish', inline = 'bsColor', group = 'General Configuration', display = display.none)
buysideColor = input(#f2364680, 'Bearish', inline = 'bsColor', group = 'General Configuration', display = display.none)
showInvalidated = DEBUG ? input.bool(true, "Show Historic Zones", group = "General Configuration", display = display.none) : true
bubbleSize = DEBUG ? input.int(5, "[DBG] Base Bubble Size", group = "Style", display = display.none) : 5
minDist = DEBUG ? input.int(0, "[DBG] Min Distance", group = "Style", display = display.none) : 0
grabsPerZone = DEBUG ? input.int(1, "[DBG] Max Grabs Per Zone", group = "Style", display = display.none) : 1
minATRBetweenPivots = DEBUG ? input.float(1, "[DBG] Min ATR Between Pivots", group = "Style", display = display.none) : 1
bubbleOffset = DEBUG ? input.float(20, "[DBG] Bubble Offset", group = "Style", display = display.none) : 20
textColor = DEBUG ? input.color(#ffffff80, "[DBG] Text Color", group = "Style", inline = "BBcolors") : #ffffff80
renderLiquidityZones = DEBUG ? input.bool(false, "[DBG] Render Liquidity Zones", group = "Style") : false
type liqInfo
int startTime
int endTime
float price
string liqType
int grabsFound = 0
type liq
liqInfo info
bool isRendered = false
line liqZone
type bubble
int barIndex
float price
float bodySize
float wickSize
string liqType
safeDeleteLiq (liq liqF) =>
liqF.isRendered := false
line.delete(liqF.liqZone)
var liq[] allLiqList = array.new<liq>(0)
highestTALiq = ta.pivothigh(pivotLenLiq, pivotLenLiq)
lowestTALiq = ta.pivotlow(pivotLenLiq, pivotLenLiq)
curATR = ta.atr(5)
renderLiq (liq liqF) =>
if renderLiquidityZones
liqF.isRendered := true
liqF.liqZone := line.new(liqF.info.startTime, liqF.info.price, nz(liqF.info.endTime, time + 1), liqF.info.price, xloc = xloc.bar_time, color = liqF.info.liqType == "Buyside" ? buysideColor : sellsideColor)
handleLiqsFinal () =>
if DEBUG
log.info("Liqudities Count " + str.tostring(allLiqList.size()))
if allLiqList.size() > 0
for i = 0 to allLiqList.size() - 1
curLiq = allLiqList.get(i)
safeDeleteLiq(curLiq)
if not curLiq.isRendered and not (not showInvalidated and not na(curLiq.info.endTime))
renderLiq(curLiq)
if bar_index > last_bar_index - maxDistanceToLastBar
if allLiqList.size() > 0
for i = 0 to allLiqList.size() - 1
curLiq = allLiqList.get(i)
if na(curLiq.info.endTime) and (curLiq.info.liqType == "Buyside" ? close > curLiq.info.price : close < curLiq.info.price)
curLiq.info.endTime := time
if not na(highestTALiq)
newLiqInfo = liqInfo.new(time[pivotLenLiq], na, highestTALiq, "Buyside")
addLiq = true
if allLiqList.size() > 0
for i = 0 to allLiqList.size() - 1
liqInfo curInfo = allLiqList.get(i).info
if na(curInfo.endTime) and curInfo.liqType == "Buyside"
if math.abs(highestTALiq - curInfo.price) < curATR * minATRBetweenPivots
addLiq := false
break
if addLiq
allLiqList.unshift(liq.new(newLiqInfo))
if allLiqList.size () > showLastXLiqs
safeDeleteLiq(allLiqList.pop())
if not na(lowestTALiq)
newLiqInfo = liqInfo.new(time[pivotLenLiq], na, lowestTALiq, "Sellside")
addLiq = true
if allLiqList.size() > 0
for i = 0 to allLiqList.size() - 1
liqInfo curInfo = allLiqList.get(i).info
if na(curInfo.endTime) and curInfo.liqType == "Sellside"
if math.abs(lowestTALiq - curInfo.price) < curATR * minATRBetweenPivots
addLiq := false
break
if addLiq
allLiqList.unshift(liq.new(newLiqInfo))
if allLiqList.size () > showLastXLiqs
safeDeleteLiq(allLiqList.pop())
var lastHigh = 0
var lastLow = 0
renderHighCircle5 = false
renderHighCircle10 = false
renderHighCircle15 = false
float highCirclePrice = na
renderLowCircle5 = false
renderLowCircle10 = false
renderLowCircle15 = false
float lowCirclePrice = na
if allLiqList.size() > 0
for i = 0 to allLiqList.size() - 1
curLiq = allLiqList.get(i)
if not na(curLiq.info.endTime)
continue
if curLiq.info.grabsFound == grabsPerZone
continue
bodySize = math.abs(close - open)
wickSize = curLiq.info.liqType == "Buyside" ? (high - math.max(close, open)) : (math.min(close, open) - low)
curWBR = wickSize / bodySize
if curLiq.info.liqType == "Buyside"
if high >= curLiq.info.price and (bar_index - lastHigh > minDist)
lastHigh := bar_index
if curWBR >= WBR * 3
renderHighCircle15 := true
else if curWBR >= WBR * 2
renderHighCircle10 := true
else if curWBR >= WBR
renderHighCircle5 := true
highCirclePrice := high + curATR * bubbleOffset / 100.0
curLiq.info.grabsFound += 1
else
if low <= curLiq.info.price and (bar_index - lastLow > minDist)
lastLow := bar_index
if curWBR >= WBR * 3
renderLowCircle15 := true
else if curWBR >= WBR * 2
renderLowCircle10 := true
else if curWBR >= WBR
renderLowCircle5 := true
lowCirclePrice := low - curATR * bubbleOffset / 100.0
curLiq.info.grabsFound += 1
plot(renderHighCircle5 and barstate.isconfirmed ? highCirclePrice : na, "", buysideColor, bubbleSize, plot.style_circles, false, 0)
plot(renderHighCircle10 and barstate.isconfirmed ? highCirclePrice : na, "", buysideColor, int(bubbleSize * 1.5), plot.style_circles, false, 0)
plot(renderHighCircle15 and barstate.isconfirmed ? highCirclePrice : na, "", buysideColor, bubbleSize * 2, plot.style_circles, false, 0)
plot(renderLowCircle5 and barstate.isconfirmed ? lowCirclePrice : na, "", sellsideColor, bubbleSize, plot.style_circles, false, 0)
plot(renderLowCircle10 and barstate.isconfirmed ? lowCirclePrice : na, "", sellsideColor, int(bubbleSize * 1.5), plot.style_circles, false, 0)
plot(renderLowCircle15 and barstate.isconfirmed ? lowCirclePrice : na, "", sellsideColor, bubbleSize * 2, plot.style_circles, false, 0)
alertcondition((renderHighCircle5 or renderHighCircle10 or renderHighCircle15) and barstate.isconfirmed, "Buyside Liquidity Grab @ {{ticker}}", "Buyside Liquidity Grab @ {{ticker}}")
alertcondition((renderLowCircle5 or renderLowCircle10 or renderLowCircle15) and barstate.isconfirmed, "Sellside Liquidity Grab @ {{ticker}}", "Sellside Liquidity Grab @ {{ticker}}")
if barstate.islast
handleLiqsFinal()
s = input.source(close)
lp = math.log(s)
n = input.int(20)
SD1 = input.bool(false,"Show 1 SD Bands")
SD2 = input.bool(false,"Show 2 SD Bands")
SD3 = input.bool(true,"Show 3 SD Bands")
SD4 = input.bool(true,"Show 4 SD Bands")
rollingMean(src,length) =>
mean = 0.00
mean := (nz(mean[1]) * (length-1) + src)/length
stdev(src,length)=>
sd=math.sqrt(rollingMean(src*src,length)-rollingMean(src,length)*rollingMean(src,length))
bandwidth(sd,length) =>
h = 0.00
h := 1.06*sd*math.pow(length,-float(1)/5)
rsd = stdev(lp,n)
rm = rollingMean(lp,n)
b = bandwidth(rsd,n)
dev1 = 1 * b
upper = rm + dev1
lower = rm - dev1
dev2 = 2 * b
upper2 = rm + dev2
lower2 = rm - dev2
dev3 = 3 * b
upper3 = rm + dev3
lower3 = rm - dev3
dev4 = 4 * b
upper4 = rm + dev4
lower4 = rm - dev4
plot(math.exp(rm),color=color.white)
plot(SD1?math.exp(upper):na,color=color.rgb(0, 220, 48,50))
plot(SD1?math.exp(lower):na,color=color.rgb(211, 32, 32,50))
plot(SD2?math.exp(upper2):na,color=color.rgb(0, 220, 48,50))
plot(SD2?math.exp(lower2):na,color=color.rgb(211, 32, 32,50))
plot(SD3?math.exp(upper3):na,color=color.rgb(0, 220, 48,50))
plot(SD3?math.exp(lower3):na,color=color.rgb(211, 32, 32,50))
plot(SD4?math.exp(upper4):na,color=color.rgb(0, 220, 48,50))
plot(SD4?math.exp(lower4):na,color=color.rgb(211, 32, 32,50))
/// �������� ������������ ///
int length = input(20, group = "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
int offset = input(4, group = "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
series float src = input(close, group = "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
bool Use_High_and_Low = input(true, group = "ï¼³ï½â€¦ï½â€ï½â€ï½â€°ï½ï½â€¡ï½â€œ")
// Visual
bool bar_color = input(true, group = "ï¼¶ï½â€°ï½â€œï½â€¢ï½ï½Å’")
color color_up = input(color.blue, group = "ï¼¶ï½â€°ï½â€œï½â€¢ï½ï½Å’")
color color_dn = input(color.red, group = "ï¼¶ï½â€°ï½â€œï½â€¢ï½ï½Å’")
/// ������������������ ���������������������� ///
var series float hlt = 0.0
series float upper33 = ta.highest(Use_High_and_Low ? high : src, length)[offset]
series float lower33 = ta.lowest( Use_High_and_Low ? high : src, length)[offset]
hlt := src > upper33 ?
lower33 : src < lower33 ?
upper33 : nz(hlt)
/// �������� ///
color color = src >= hlt
? color_up
: color_dn
p1 = plot(hlt,
color = color,
style = plot.style_cross
)
p2 = plot(src, display = display.none)
//fill(p1, p2, color = color.new(color, 80))
// Bar color
barcolor(bar_color ? color : na)
src44 = input(close, title='Source')
X1 = input.int(5, 'Faster Period', minval=1)
X2 = input.int(5, 'Period', minval=1)
length44 = input.int(2,'Bollinger Bands MA Period', minval=1)
X4 = input.int(20, 'Slower Period', minval=1)
mult = 2
mav = input.string(title='Moving Average Type', defval='TMA', options=['SMA', 'EMA', 'WMA', 'TMA'])
//showsupport = input(title="Show MOVING AVERAGE?", defval=false)
ma(source, length44, _type) =>
switch _type
"SMA" => ta.sma(source, length44)
"EMA" => ta.ema(source, length44)
"WMA" => ta.wma(source, length44)
"TMA" => ta.sma(ta.sma(source, math.ceil(length44 / 2)), math.floor(length44 / 2) + 1)
K1 = ta.highest(low,X1)
K2 = ta.lowest(K1,X2)
BBandTop = ma(K2, length44, mav) + mult * ta.stdev(K2, length44)
PTTl = ta.lowest(BBandTop,X4)
E1 = ta.lowest(high,X1)
E2 = ta.highest(E1,X2)
BBandBot = ma(E2, length44, mav) - mult * ta.stdev(E2, length44)
PTTh = ta.highest(BBandBot,X4)
plot(PTTh, "High", color=color.rgb(199, 56, 224, 100), linewidth=2)
plot(PTTl, "Low", color=color.rgb(33, 170, 243, 100), linewidth=2)
https://i.hizliresim.com/myfknrj.png
https://i.hizliresim.com/s1h128o.png
https://i.hizliresim.com/gdfza0z.png
bu kodda https://tr.tradingview.com/v/tjP35RG5/ rsi için...
Allah, senden razı olsun. Sayın, olimpik forum....
(Babama geçmiş olsun dileğiniz için......)
İyi dileğinize istinaden....Çam sakızı çoban armağanı.....Küçük bir hediyem olsun size....
Belki denersiniz....Daha da geliştirirsiniz.....Kombine bir kod birleştirme çalışması....
kısa periyotlar için....1-5-15
https://i.hizliresim.com/3i4q5f7.png
kodu....
PHP Code:
//@version=5
indicator("olimpik forum",overlay=true,max_boxes_count=50,max_labels_count=50,max_lines_count=144,max_bars_back=1000)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Settings {
// ~~ Tooltips
var t1 = "Reverses the orientation of labels and calculations in the Gann Box, offering alternative analytical perspectives."
var t2 = "Extend the drawing of Gann lines or boxes into the future beyond the current last bar to anticipate potential support or resistance levels. This setting is crucial for traders looking to forecast future price movements and prepare for potential market reactions at these extended levels."
var t3 = "Enables or disables the display of the Gann Box. When enabled, the Gann Box will be visible on the chart, illustrating key levels based on selected high and low points. The Gann Box is a fundamental tool in Gann analysis, providing insights into potential support and resistance levels, and enabling traders to identify strategic entry and exit points."
var t4 = "Enables or disables the display of Fibonacci labels within the Gann Box and Gann Fan. Useful for identifying specific Fibonacci retracement levels for support or resistance, these labels help traders to quickly recognize significant percentage levels that are often considered in trading strategies for their potential to indicate reversal points."
var t5 = "Enables or disables the display of Gann Curves. When enabled, it draws curves based on Gann percentages to predict potential market movements. These curves offer a dynamic view of potential support and resistance levels as they adjust to changing market conditions, aiding in the analysis of momentum and trend strength."
var t6 = "Enables or disables the display of Gann Angles. These are diagonal lines that extend from significant price points to provide insights into future support and resistance levels. Gann Angles are a cornerstone of Gann theory, offering a unique perspective on price and time dynamics that can signal significant market movements."
//~~}
//General{
reverse = input.bool(false,title="Reverse",group="General Settings",tooltip=t1)
Future = input.bool(true, title="Extend",group="General Settings",tooltip=t2)
//~~}
//Levels
perc = array.from(input.float(25.0,title="",step=.1,inline="1", group="Gann Box")/100,
input.float(38.2,title="",step=.1,inline="2", group="Gann Box")/100,
input.float(50.0,title="",step=.1,inline="3", group="Gann Box")/100,
input.float(61.8,title="",step=.1,inline="4", group="Gann Box")/100,
input.float(75.0,title="",step=.1,inline="5", group="Gann Box")/100)
//Curve{
showCurve = input.bool(true, title="Show Curves",group="Gann Curves",tooltip=t5)
cperc = array.from(input.bool(true,"25%",inline="c1",group="Gann Curves"),
input.bool(true,"38.2%",inline="c2",group="Gann Curves"),
input.bool(true,"50%",inline="c3",group="Gann Curves"),
input.bool(true,"61.8%",inline="c4",group="Gann Curves"),
input.bool(true,"75%",inline="c5",group="Gann Curves"),
input.bool(true,"100%",inline="c6",group="Gann Curves"))
//Coloring
ccol = array.from(input.color(#ff0000,"",inline="c1",group="Gann Curves"),
input.color(#ff0000,"",inline="c2",group="Gann Curves"),
input.color(#ff0000,"",inline="c3",group="Gann Curves"),
input.color(#ff0000,"",inline="c4",group="Gann Curves"),
input.color(#ff0000,"",inline="c5",group="Gann Curves"),
input.color(#ff0000,"",inline="c6",group="Gann Curves"))
//~~}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Variables {
b = bar_index
var float Hi = na
var float Lo = na
var int hLoc = na
var int lLoc = na
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Storage {
var polyline [] arr = array.new<polyline>(7)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Visible Chart Function {
barIsVisible() => time >= chart.left_visible_bar_time and time <= chart.right_visible_bar_time
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Main {
//Visible High & Low{
if barIsVisible() and high >= nz(Hi, high)
Hi := high
hLoc := bar_index
if barIsVisible() and low <= nz(Lo, low)
Lo := low
lLoc := bar_index
x0 = lLoc<hLoc?lLoc:hLoc
x6 = lLoc<hLoc?(Future?math.min(bar_index+500,hLoc+(hLoc-lLoc)):hLoc):(Future?math.min(bar_index+500,lLoc+(lLoc-hLoc)):lLoc)
y0 = lLoc<hLoc?Lo:Hi
y6 = lLoc<hLoc?Hi:Lo
//~~}
//Fibonacci Levels{
x = array.new<int>(1,x0)
y = array.new<float>(1,y0)
for i=0 to 4
x.push(math.round(x0+(x6-x0)*array.get(perc,i)))
y.push(y0+(y6-y0)*array.get(perc,i))
if i==4
x.push(x6)
y.push(y6)
//~~}
// ~~ Gann Curve {
if showCurve and barIsVisible()
for i=1 to arr.size()-1
if cperc.get(i-1)
points = array.new<chart.point>()
for j = 0 to 90 by 1
xx = x0 - (x0-x.get(i))*math.sin(math.toradians(j))
yy = y0 + math.cos(math.toradians(j))*(y.get(i)-y0)
points.push(chart.point.from_index(math.round(xx),yy))
poly = polyline.new(points,false,false,line_color=ccol.get(i-1))
arr.unshift(poly)
arr.pop().delete()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
src = input(hl2, title="Source",group = "Trend Continuation Signals with TP & SL")
Multiplier = input.float(2,title="Sensitivity (0.5 - 5)", step=0.1, defval=2, minval=0.5, maxval=5,group = "Trend Continuation Signals with TP & SL")
atrPeriods = input.int(14,title="ATR Length", defval=10,group = "Trend Continuation Signals with TP & SL")
atrCalcMethod= input.string("Method 1",title = "ATR Calculation Methods",options = ["Method 1","Method 2"],group = "Trend Continuation Signals with TP & SL")
cloud_val = input.int(10,title = "Cloud Moving Average Length", defval = 10, minval = 5, maxval = 500,group = "Trend Continuation Signals with TP & SL")
stopLossVal = input.float(2.0, title="Stop Loss Percent (0 for Disabling)", minval=0,group = "Trend Continuation Signals with TP & SL")
showBuySellSignals = input.bool(true,title="Show Buy/Sell Signals", defval=true,group = "Trend Continuation Signals with TP & SL")
showMovingAverageCloud = input.bool(false, title="Show Cloud MA",group = "Trend Continuation Signals with TP & SL")
percent(nom, div) =>
100 * nom / div
src1 = ta.hma(open, 5)[1]
src2 = ta.hma(close, 12)
momm1 = ta.change(src1)
momm2 = ta.change(src2)
f1(m, n) => m >= n ? m : 0.0
f2(m, n) => m >= n ? 0.0 : -m
m1 = f1(momm1, momm2)
m2 = f2(momm1, momm2)
sm1 = math.sum(m1, 1)
sm2 = math.sum(m2, 1)
cmoCalc = percent(sm1-sm2, sm1+sm2)
hh = ta.highest(2)
h1 = ta.dev(hh, 2) ? na : hh
hpivot = fixnan(h1)
ll = ta.lowest(2)
l1 = ta.dev(ll, 2) ? na : ll
lpivot = fixnan(l1)
rsiCalc = ta.rsi(close,9)
lowPivot = lpivot
highPivot = hpivot
sup = rsiCalc < 25 and cmoCalc > 50 and lowPivot
res = rsiCalc > 75 and cmoCalc < -50 and highPivot
atr2 = ta.sma(ta.tr, atrPeriods)
atr= atrCalcMethod == "Method 1" ? ta.atr(atrPeriods) : atr2
up=src-(Multiplier*atr)
up1 = nz(up[1],up)
up := close[1] > up1 ? math.max(up,up1) : up
dn=src+(Multiplier*atr)
dn1 = nz(dn[1], dn)
dn := close[1] < dn1 ? math.min(dn, dn1) : dn
trend = 1
trend := nz(trend[1], trend)
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
buySignal = trend == 1 and trend[1] == -1
sellSignal = trend == -1 and trend[1] == 1
pos = 0.0
pos:= buySignal? 1 : sellSignal ? -1 : pos[1]
longCond = buySignal and pos[1]!= 1
shortCond = sellSignal and pos[1]!=-1
entryOfLongPosition = ta.valuewhen(longCond , close, 0)
entryOfShortPosition = ta.valuewhen(shortCond, close, 0)
sl = stopLossVal > 0 ? stopLossVal / 100 : 99999
stopLossForLong = entryOfLongPosition * (1 - sl)
stopLossForShort = entryOfShortPosition * (1 + sl)
takeProfitForLong1R = entryOfLongPosition * (1 + sl)
takeProfitForShort1R = entryOfShortPosition * (1 - sl)
takeProfitForLong2R = entryOfLongPosition * (1 + sl*2)
takeProfitForShort2R = entryOfShortPosition * (1 - sl*2)
takeProfitForLong3R = entryOfLongPosition * (1 + sl*3)
takeProfitForShort3R = entryOfShortPosition * (1 - sl*3)
long_sl = low < stopLossForLong and pos[1]==1
short_sl = high> stopLossForShort and pos[1]==-1
takeProfitForLongFinal = high>takeProfitForLong3R and pos[1]==1
takeProfitForShortFinal = low <takeProfitForShort3R and pos[1]==-1
if long_sl or short_sl or takeProfitForLongFinal or takeProfitForShortFinal
pos:=0
lindex = ta.valuewhen(longCond, bar_index, 0)
sindex= ta.valuewhen(shortCond, bar_index, 0)
entryColor = pos==1? color.blue : color.purple
if barstate.islast and pos!=0
lineEntry = line.new(bar_index, pos>0?entryOfLongPosition :entryOfShortPosition , pos>0?lindex:sindex, pos>0?entryOfLongPosition :entryOfShortPosition , color=entryColor )
line.delete(lineEntry[1])
stopLine = line.new(bar_index, pos>0?stopLossForLong :stopLossForShort , pos>0?lindex:sindex, pos>0?stopLossForLong :stopLossForShort , color=color.red )
tpLine1 = line.new(bar_index, pos>0?takeProfitForLong1R:takeProfitForShort1R, pos>0?lindex:sindex, pos>0?takeProfitForLong1R:takeProfitForShort1R, color=color.green)
tpLine2 = line.new(bar_index, pos>0?takeProfitForLong2R:takeProfitForShort2R, pos>0?lindex:sindex, pos>0?takeProfitForLong2R:takeProfitForShort2R, color=color.green)
tpLine3 = line.new(bar_index, pos>0?takeProfitForLong3R:takeProfitForShort3R, pos>0?lindex:sindex, pos>0?takeProfitForLong3R:takeProfitForShort3R, color=color.green)
line.delete(stopLine [1])
line.delete(tpLine1[1])
line.delete(tpLine2[1])
line.delete(tpLine3[1])
labelEntry = label.new(bar_index, pos>0?entryOfLongPosition :entryOfShortPosition , color=entryColor , textcolor=#000000, style=label.style_label_left, text="Giriş: " + str.tostring(pos>0?entryOfLongPosition :entryOfShortPosition ))
label.delete(labelEntry[1])
labelStop = label.new(bar_index, pos>0?stopLossForLong :stopLossForShort , color=color.red , textcolor=#000000, style=label.style_label_left, text="Stop: " + str.tostring(math.round((pos>0?stopLossForLong :stopLossForShort) *100)/100))
labelTp1 = label.new(bar_index, pos>0?takeProfitForLong1R:takeProfitForShort1R, color=color.green, textcolor=#000000, style=label.style_label_left, text="(1-Kar Al: " +str.tostring(math.round((pos>0?takeProfitForLong1R:takeProfitForShort1R) * 100)/100))
labelTp2 = label.new(bar_index, pos>0?takeProfitForLong2R:takeProfitForShort2R, color=color.green, textcolor=#000000, style=label.style_label_left, text="(2-Kar Al: " + str.tostring(math.round((pos>0?takeProfitForLong2R:takeProfitForShort2R) * 100)/100))
labelTp3 = label.new(bar_index, pos>0?takeProfitForLong3R:takeProfitForShort3R, color=color.green, textcolor=#000000, style=label.style_label_left, text="(3-Kar Al: " + str.tostring(math.round((pos>0?takeProfitForLong3R:takeProfitForShort3R) * 100)/100))
label.delete(labelStop [1])
label.delete(labelTp1[1])
label.delete(labelTp2[1])
label.delete(labelTp3[1])
changeCond = trend != trend[1]
smaSrcHigh = ta.ema(high,cloud_val)
smaSrcLow = ta.ema(low, cloud_val)
[macdLine, signalLine, histLine] = ta.macd(close, 12, 26, 9)
//plot_high = plot(showMovingAverageCloud? smaSrcHigh : na, color = na, transp = 1, editable = false)
//plot_low = plot(showMovingAverageCloud? smaSrcLow : na, color = na, transp = 1, editable = false)
//plotshape(longCond ? up : na, title="UpTrend Begins", location=location.belowbar, style=shape.circle, size=size.tiny, color=color.new(color.teal,transp = 50) )
plotshape(longCond and showBuySellSignals ? up : na, title="Buy", text="Al", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.new(color.lime,transp=50), textcolor=color.white )
//plotshape(shortCond ? dn : na, title="DownTrend Begins", location=location.abovebar, style=shape.circle, size=size.tiny, color=color.new(color.red,transp = 50) )
plotshape(shortCond and showBuySellSignals ? dn : na, title="Sell", text="Sat", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.new(color.red,transp=50), textcolor=color.white)
///////////////////////
length4 = input.int(title = "Range", defval = 20, minval = 1)
length5 = input.int(title = "Denge", defval = 100, minval = 1)
offset4 = input(title = "Range", defval = 0)
offset5 = input(title = "Denge", defval = 0)
src77= input(close)
ama4 = 0.
ama5 = 0.
hh4 = math.max(math.sign(ta.change(ta.highest(length4))), 0)
ll4 = math.max(math.sign(ta.change(ta.lowest(length4)) * -1), 0)
tc4 = math.pow(ta.sma(hh4 or ll4 ? 1 : 0, length4), 2)
ama4 := nz(ama4[1] + tc4 * (src77 - ama4[1]), src77)
hh5 = math.max(math.sign(ta.change(ta.highest(length5))), 0)
ll5 = math.max(math.sign(ta.change(ta.lowest(length5))* -1), 0)
tc5 = math.pow(ta.sma(hh5 or ll5 ? 1 : 0, length5), 2)
ama5 := nz(ama5[1] + tc5 * (src77 - ama5[1]), src77)
plot(ama4, 'Range', color.new(#ccff00, 0), 2, offset = offset4)
plot(ama5, 'Denge', color.new(#df00fc, 0), 2, offset = offset5)
////////////
import loxx/loxxexpandedsourcetypes/4
greencolor = #2DD204
redcolor = #D2042D
fdRange(int size)=>
out = math.max(nz(close[size]), ta.highest(high, size)) - math.min(nz(close[size]), ta.lowest(low, size))
out
jurikFractalDimension(int size, int count)=>
int window1 = size * (count - 1)
int window2 = size * count
float smlRange = 0
float smlSumm = 0
smlRange := fdRange(size)
smlSumm := nz(smlSumm[1]) + smlRange
smlSumm -= nz(smlRange[window1])
out = 2.0 - math.log(fdRange(window2) / (smlSumm / window1)) / math.log(count)
out
kama(float src, int period, float fast, float slow, float power, bool JurikFD)=>
float fastend = (2.0 / (fast + 1))
float slowend = (2.0 / (slow + 1))
float efratio = 0
float diff = 0
float signal = 0
float noise = 0
float fract = jurikFractalDimension(period, 2)
if (JurikFD)
efratio := math.min(2.0 - fract, 1.0)
else
signal := math.abs(src - nz(src[period]))
diff := math.abs(src - nz(src[1]))
for k = 0 to period - 1
noise += nz(diff[k])
if (noise != 0)
efratio := signal / noise
else
efratio := 1
float smooth = math.pow(efratio * (fastend - slowend) + slowend, power)
float kama = src
kama := nz(kama[1]) + smooth * (src - nz(kama[1]))
kama
gkyzvol(int per)=>
float gzkylog = math.log(open / nz(close[1]))
float pklog = math.log(high / low)
float gklog = math.log(close / open)
float garmult = (2 * math.log(2) - 1)
float gkyzsum = 1 / per * math.sum(math.pow(gzkylog, 2), per)
float parkinsonsum = 1 / (2 * per) * math.sum(math.pow(pklog, 2), per)
float garmansum = garmult / per * math.sum(math.pow(gklog, 2), per)
float sum = gkyzsum + parkinsonsum - garmansum
float devpercent = math.sqrt(sum)
devpercent
gkyzFilter(float src, int len, float filter)=>
float price = src
float filtdev = filter * gkyzvol(len) * src
price := math.abs(price - nz(price[1])) < filtdev ? nz(price[1]) : price
price
smthtype = input.string("Kaufman", "Heikin-Ashi Better Caculation Type", options = ["AMA", "T3", "Kaufman"], group = "Source Settings")
srcin = input.string("Close", "Source", group= "Source Settings",
options =
["Close", "Open", "High", "Low", "Median", "Typical", "Weighted", "Average", "Average Median Body", "Trend Biased", "Trend Biased (Extreme)",
"HA Close", "HA Open", "HA High", "HA Low", "HA Median", "HA Typical", "HA Weighted", "HA Average", "HA Average Median Body", "HA Trend Biased", "HA Trend Biased (Extreme)",
"HAB Close", "HAB Open", "HAB High", "HAB Low", "HAB Median", "HAB Typical", "HAB Weighted", "HAB Average", "HAB Average Median Body", "HAB Trend Biased", "HAB Trend Biased (Extreme)"])
AmaPeriod = input.int(10, "AMA Period", group = "Basic Settings")
FastEnd = input.int(2, "Fast-End", group = "Basic Settings")
SlowEnd = input.int(20, "Slow-End", group = "Basic Settings")
SmoothPower = input.int(2, "Smooth Power", group = "Basic Settings")
JurikFDAdaptive = input.bool(false, "Jurik Fractal Dimension Adaptive?", group = "Basic Settings")
filterop = input.string("Both", "Filter Options", options = ["Price", "JFDAGKYZFKAMA", "Both", "None"], group= "Filter Settings")
filter = input.float(0.5, "Filter Multiple", minval = 0, group= "Filter Settings")
filterperiod = input.int(15, "Filter Period", minval = 0, group= "Filter Settings")
colorbars = input.bool(true, "Color bars?", group= "UI Options")
showSigs = input.bool(true, "Show Signals?", group = "UI Options")
kfl=input.float(0.666, title="* Kaufman's Adaptive MA (KAMA) Only - Fast End", group = "Moving Average Inputs")
ksl=input.float(0.0645, title="* Kaufman's Adaptive MA (KAMA) Only - Slow End", group = "Moving Average Inputs")
amafl = input.int(2, title="* Adaptive Moving Average (AMA) Only - Fast", group = "Moving Average Inputs")
amasl = input.int(30, title="* Adaptive Moving Average (AMA) Only - Slow", group = "Moving Average Inputs")
haclose = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close)
haopen = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, open)
hahigh = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, high)
halow = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, low)
hamedian = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hl2)
hatypical = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hlc3)
haweighted = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, hlcc4)
haaverage = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, ohlc4)
float src99 = switch srcin
"Close" => loxxexpandedsourcetypes.rclose()
"Open" => loxxexpandedsourcetypes.ropen()
"High" => loxxexpandedsourcetypes.rhigh()
"Low" => loxxexpandedsourcetypes.rlow()
"Median" => loxxexpandedsourcetypes.rmedian()
"Typical" => loxxexpandedsourcetypes.rtypical()
"Weighted" => loxxexpandedsourcetypes.rweighted()
"Average" => loxxexpandedsourcetypes.raverage()
"Average Median Body" => loxxexpandedsourcetypes.ravemedbody()
"Trend Biased" => loxxexpandedsourcetypes.rtrendb()
"Trend Biased (Extreme)" => loxxexpandedsourcetypes.rtrendbext()
"HA Close" => loxxexpandedsourcetypes.haclose(haclose)
"HA Open" => loxxexpandedsourcetypes.haopen(haopen)
"HA High" => loxxexpandedsourcetypes.hahigh(hahigh)
"HA Low" => loxxexpandedsourcetypes.halow(halow)
"HA Median" => loxxexpandedsourcetypes.hamedian(hamedian)
"HA Typical" => loxxexpandedsourcetypes.hatypical(hatypical)
"HA Weighted" => loxxexpandedsourcetypes.haweighted(haweighted)
"HA Average" => loxxexpandedsourcetypes.haaverage(haaverage)
"HA Average Median Body" => loxxexpandedsourcetypes.haavemedbody(haclose, haopen)
"HA Trend Biased" => loxxexpandedsourcetypes.hatrendb(haclose, haopen, hahigh, halow)
"HA Trend Biased (Extreme)" => loxxexpandedsourcetypes.hatrendb(haclose, haopen, hahigh, halow)
"HAB Close" => loxxexpandedsourcetypes.habclose(smthtype, amafl, amasl, kfl, ksl)
"HAB Open" => loxxexpandedsourcetypes.habopen(smthtype, amafl, amasl, kfl, ksl)
"HAB High" => loxxexpandedsourcetypes.habhigh(smthtype, amafl, amasl, kfl, ksl)
"HAB Low" => loxxexpandedsourcetypes.hablow(smthtype, amafl, amasl, kfl, ksl)
"HAB Median" => loxxexpandedsourcetypes.habmedian(smthtype, amafl, amasl, kfl, ksl)
"HAB Typical" => loxxexpandedsourcetypes.habtypical(smthtype, amafl, amasl, kfl, ksl)
"HAB Weighted" => loxxexpandedsourcetypes.habweighted(smthtype, amafl, amasl, kfl, ksl)
"HAB Average" => loxxexpandedsourcetypes.habaverage(smthtype, amafl, amasl, kfl, ksl)
"HAB Average Median Body" => loxxexpandedsourcetypes.habavemedbody(smthtype, amafl, amasl, kfl, ksl)
"HAB Trend Biased" => loxxexpandedsourcetypes.habtrendb(smthtype, amafl, amasl, kfl, ksl)
"HAB Trend Biased (Extreme)" => loxxexpandedsourcetypes.habtrendbext(smthtype, amafl, amasl, kfl, ksl)
=> haclose
src99 := filterop == "Both" or filterop == "Price" and filter > 0 ? gkyzFilter(src99, filterperiod, filter) : src99
out = kama(src99, AmaPeriod, FastEnd, SlowEnd, SmoothPower, JurikFDAdaptive)
out := filterop == "Both" or filterop == "JFDAGKYZFKAMA" and filter > 0 ? gkyzFilter(out, filterperiod, filter) : out
sig = out[1]
goLong_pre = ta.crossover(out, sig)
goShort_pre = ta.crossunder(out, sig)
contSwitch = 0
contSwitch := nz(contSwitch[1])
contSwitch := goLong_pre ? 1 : goShort_pre ? -1 : contSwitch
goLong = goLong_pre and ta.change(contSwitch)
goShort = goShort_pre and ta.change(contSwitch)
colorout = contSwitch == 1 ? greencolor : redcolor
barcolor(colorbars ? colorout : na)
//////////////////////////////
Price = input(hl2, title='Price')
PeriodF = input(10, title='PeriodF')
PeriodS = input(50, title='PeriodS')
EnableSmooth = input(true, title='EnableSmooth')
AMA(Period, Price) =>
//Vars:
Noise = 0.00
Signal = 0.00
Diff = 0.00
efRatio = 0.00
Smooth = 1.00
Fastest = 0.6667
Slowest = 0.0645
AdaptMA = 0.00
AMA = 0.00
Diff := math.abs(Price - nz(Price[1]))
if bar_index <= Period
AdaptMA := Price
AdaptMA
if bar_index > Period
Signal := math.abs(Price - nz(Price[Period]))
Noise := math.sum(Diff, Period)
efRatio := Signal / Noise
Smooth := math.pow(efRatio * (Fastest - Slowest) + Slowest, 2)
AdaptMA := nz(AdaptMA[1]) + Smooth * (Price - nz(AdaptMA[1]))
AdaptMA
AMA := AdaptMA
AMA
AMAF(Period, Pcnt, Price) =>
//Vars:
Noise = 0.00
Signal = 0.00
Diff = 0.00
efRatio = 0.00
Smooth = 1.00
Fastest = 0.6667
Slowest = 0.0645
AdaptMA = 0.00
AMAFltr = 0.00
AMAF = 0.00
Diff := math.abs(Price - nz(Price[1]))
if bar_index <= Period
AdaptMA := Price
AdaptMA
if bar_index > Period
Signal := math.abs(Price - nz(Price[Period]))
Noise := math.sum(Diff, Period)
efRatio := Signal / Noise
Smooth := math.pow(efRatio * (Fastest - Slowest) + Slowest, 2)
AdaptMA := nz(AdaptMA[1]) + Smooth * (Price - nz(AdaptMA[1]))
AMAFltr := ta.stdev(AdaptMA - nz(AdaptMA[1]), Period) * Pcnt
AMAFltr
AMAF := AMAFltr
AMAF
//Vars:
AMAValF = 0.00
AMAValS = 0.00
AMAValF := EnableSmooth ? ta.linreg(AMA(PeriodF, Price), PeriodF, 0) : AMA(PeriodF, Price)
AMAValS := EnableSmooth ? ta.linreg(AMA(PeriodS, Price), PeriodS, 0) : AMA(PeriodS, Price)
Plot1 = plot(AMAValF, 'Hızlı10', color=color.new(#ffeb3b, 100), linewidth=2)
Plot2 = plot(AMAValS, 'Yavaş50', color=color.new(#df40fb, 100), linewidth=2)
fill(Plot1, Plot2, color=AMAValF > AMAValS ? color.rgb(255, 235, 59, 60) : color.rgb(223, 64, 251, 60))
long = ta.crossover(AMAValF, AMAValS)
short = ta.crossunder(AMAValF, AMAValS)
// Plots labels
l = short ? label.new(bar_index, AMAValF, 'SAT', color=color.red, textcolor=color.white, style=label.style_label_down, yloc=yloc.price, size=size.small) : long ? label.new(bar_index, AMAValF, 'AL', color=color.green, textcolor=color.white, style=label.style_label_up, yloc=yloc.price, size=size.small) : na
////////////
PHP Code:
//@version=5
type bar
float o = open
float h = high
float l = low
float c = close
int i = bar_index
type trend
float h = na
float l = na
type scythe
polyline a = na
line b = na
type target
float u = na
float l = na
float p = na
int d = 0
bool r = false
line v = na
line h = na
label e = na
type alerts
bool u = na
bool d = na
bool b = na
bool s = na
type prompt
string s = ''
bool c = false
method notify(prompt p) =>
if p.c
alert(p.s, alert.freq_once_per_bar_close)
method any(alerts a) =>
string s = switch
a.s => 'Target Reached '
a.b => 'Target Invalidated'
a.u => 'Breakout '
a.d => 'Breakdown'
=> na
prompt.new(s, not na(s))
method atr(bar b, simple int len = 1) =>
float tr =
na(b.h[1]) ?
b.h - b.l :
math.max(
math.max(
b.h - b.l,
math.abs(b.h - b.c[1])),
math.abs (b.l - b.c[1]))
len == 1 ? tr : ta.rma(tr, len)
method piv(trend t) =>
bool b = switch
na(t.h) and na(t.l) => false
=> true
b
method blade(array<chart.point> a, bool p, simple color u, simple color d) =>
polyline.new(a, false, true, xloc.bar_index, p ? d : u, p ? color.new(d, 80) : color.new(u, 80))
method handle(bar b, trend t, float s) =>
line l = switch
not na(t.l) =>
line.new(b.i, b.h + s, b.i, b.l , xloc.bar_index, extend.none, #9c4b11, line.style_solid, 3)
not na(t.h) =>
line.new(b.i, b.h , b.i, b.l - s, xloc.bar_index, extend.none, #9c4b11, line.style_solid, 3)
l
method goal(target t, bar b, simple int len) =>
t.v := line .new(b.i, b.c, b.i , t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
t.h := line .new(b.i, t.p, b.i + len, t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
//t.e := label.new(b.i + len, t.p, "HEDEF", xloc.bar_index, yloc.price, #f0a71f78, label.style_label_left, chart.fg_color, size.normal)
method cu(target t, bar b) =>
t.l[1] < b.c[1] and t.l > b.c
method co(target t, bar b) =>
t.u[1] > b.c[1] and t.u < b.c
method cr(target t, bar b) =>
((t.d == 1 and b.c > t.p) or
(t.d == -1 and b.c < t.p))
method reached(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#4caf4f78)
t.e.set_text ('KAR-AL' )
method failed(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#a53a3a78)
t.e.set_text ('GEÇERSİZ' )
const string ts = 'Controls how restrained the target calculation is, higher values will result in tighter targets.'
const string tb = 'Adjusts the length of the scythes blade'
const string tp = 'Swing detection length'
const string gs = 'Scythes', const string gt = 'Targets', const string gu = 'UI Options'
len = input.int (20 , "Pivot Length" , 20, 100, 1 , tp, group = gs)
ext = input.int (40 , "Scythe Length" , 20, 200, 1 , tb, group = gs)
sen = input.int (50 , "Sensitivity %", 0 , 100, 10, ts, group = gt)
bts = input.bool (true , "Display" , group = gt)
bbs = input.bool (true , "Breakouts" , group = gu)
colu = input.color(#eee7df, "" , inline = '1', group = gu)
cold = input.color(#c71313, "" , inline = '1', group = gu)
bar b = bar .new( )
float s = b .atr( len) / len
trend t = trend.new(
ta.pivothigh(len, len),
ta.pivotlow (len, len))
var target g = target.new ()
var map<int, float> u = map .new<int, float>()
var map<int, float> l = map .new<int, float>()
if t.piv()
array<chart.point> a = array.new<chart.point>()
bar z = b[len]
bool p = na(t.l)
for i = 0 to ext - 1
float c = s * i + s * math.pow(i, 2) / ext
a.push(chart.point.from_index(z.i + i, (p ? (z.h - c) : (z.l + c))))
a.push(chart.point.from_index(z.i, (p ? (z.h - s * ext / 5) : (z.l + s * ext / 5))))
switch
not na(t.l) =>
l.clear()
for point in a
l.put(point.index, point.price)
not na(t.h) =>
u.clear()
for point in a
u.put(point.index, point.price)
scythe n = scythe.new(a.blade(p, colu, cold), z.handle(t, s * len))
g.u := u.contains(b.i) ? u.get(b.i) : na
g.l := l.contains(b.i) ? l.get(b.i) : na
bool ucon = false
bool dcon = false
bool bcon = false
bool scon = false
if g.cr(b) and not g.r and bts
g.reached(b)
g.r := true
scon := true
if g.co(b) and bts
if not g.r
g.failed(b)
bcon := true
else
ucon := true
g.r := false
g.d := 1
g.p := b.c + s * ext * (2 - sen / 100)
g.goal(b, len)
if g.cu(b) and bts
if not g.r
g.failed(b)
bcon := true
else
dcon := true
g.r := false
g.d := -1
g.p := b.c - s * ext * (2 - sen / 100)
g.goal(b, len)
alerts a = alerts.new(
ucon,
dcon,
bcon,
scon)
plotshape(not na(t.l) ? (b[len]).l + s * len / 5 : na, "ÇIPA", shape.diamond, location.absolute, colu, -len, size = size.normal)
plotshape(not na(t.h) ? (b[len]).h - s * len / 5 : na, "TIRPAN", shape.diamond, location.absolute, cold, -len, size = size.normal)
//plotshape(bbs and a.d, "KIRILIM", shape.labeldown, location.abovebar, color.new(cold, 60), 0, 'AK', chart.fg_color, size = size.normal)
//plotshape(bbs and a.u, "KIRILIM", shape.labelup , location.belowbar, color.new(colu, 60), 0, 'YK', chart.fg_color, size = size.normal)
//alertcondition(a.b, 'Target Reached ', 'Target Reached ')
//alertcondition(a.s, 'Target Invalidated', 'Target Invalidated')
//alertcondition(a.u, 'Breakout ' , 'Breakout ' )
//alertcondition(a.d, 'Breakdown' , 'Breakdown' )
a.any().notify()
///////////////////////////////
PHP Code:
//@version=5
dual_color=false
var bar_value= 1 //(1-16)
currentHigh = high
previousHigh = high[1]
currentClose = close
previousClose = close[1]
currentLow = low
previousLow = low[1]
//
condition1 = currentHigh > previousHigh and currentClose > previousClose and currentLow > previousLow
condition2 = currentHigh < previousHigh and currentClose > previousClose and currentLow > previousLow
condition3 = currentHigh > previousHigh and currentClose > previousClose and currentLow < previousLow
condition4 = currentHigh < previousHigh and currentClose > previousClose and currentLow < previousLow
//--------------------------------------------------------
condition5 = currentHigh > previousHigh and currentClose < previousClose and currentLow > previousLow
condition6 = currentHigh < previousHigh and currentClose < previousClose and currentLow > previousLow
condition7 = currentHigh > previousHigh and currentClose < previousClose and currentLow < previousLow
condition8 = currentHigh < previousHigh and currentClose < previousClose and currentLow < previousLow
open_up = close > open[1]
open_down = close < open[1]
switch
condition1 and open_up => bar_value:=16
condition1 and open_down => bar_value:=15
condition2 and open_up => bar_value:=14
condition2 and open_down => bar_value:=13
condition3 and open_up => bar_value:=12
condition3 and open_down => bar_value:=11
condition4 and open_up => bar_value:=10
condition4 and open_down => bar_value:=9
condition5 and open_up => bar_value:=8
condition5 and open_down => bar_value:=7
condition6 and open_up => bar_value:=6
condition6 and open_down => bar_value:=5
condition7 and open_up => bar_value:=4
condition7 and open_down => bar_value:=3
condition8 and open_up => bar_value:=2
condition8 and open_down => bar_value:=1
//plot(bar_value,display = display.none,title="Bar Value")
barcolor(condition1 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H+")
barcolor(condition2 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H-")
barcolor(condition3 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L-H+")
barcolor(condition4 and not dual_color ? color.rgb(252, 223, 2) : na, title="C+L-H-")
//--------------------------------------------------------------------------
barcolor(condition5 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H+")
barcolor(condition6 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H-")
barcolor(condition7 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H+")
barcolor(condition8 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H-")
PHP Code:
greencolor = #2DD204
redcolor = #D2042D
_jfract(count)=>
window = math.ceil(count/2)
_hl1 = (ta.highest(high[window], window) - ta.lowest(low[window], window)) / window
_hl2 = (ta.highest(high, window) - ta.lowest(low, window)) / window
_hl = (ta.highest(high, count) - ta.lowest(low, count)) / count
_d = (math.log(_hl1 + _hl2) - math.log(_hl)) / math.log(2)
dim = _d < 1 ? 1 : _d > 2 ? 2 : _d
_kama(src, len, fast, slow, jcount, efratiocalc) =>
fastend = (2.0 /(fast + 1))
slowend = (2.0 /(slow + 1))
mom = math.abs(ta.change(src, len))
vola = math.sum(math.abs(ta.change(src)), len)
efratio = efratiocalc == "Regular" ? (vola != 0 ? mom / vola : 0) : math.min(2.0-_jfract(jcount), 1.0)
alpha = math.pow(efratio * (fastend - slowend) + slowend, 2)
kama = 0.0
kama := alpha * src + (1 - alpha) * nz(kama[1], src)
kama
blsrc = input.source(hl2, "Source", group = "Kaufman AMA Settings")
period = input.int(10, "Period", minval = 0, group = "Kaufman AMA Settings")
kama_fastend = input.float(2, "Kaufman AMA Fast-end Period", minval = 0.0, group = "Kaufman AMA Settings")
kama_slowend = input.float(30, "Kaufman AMA Slow-end Period", minval = 0.0, group = "Kaufman AMA Settings")
efratiocalc = input.string("Regular", "Efficiency Ratio Type", options = ["Regular", "Jurik Fractal Dimension Adaptive"], group = "Kaufman AMA Settings")
jcount = input.int(defval=2, title="Jurik Fractal Dimension Count ", group = "Kaufman AMA Settings")
start = input.float(0, "Start", minval = 0.0, step = 0.01, group = "Parabolic SAR")
accel = input.float(0.1, "Acceleration", minval = 0.0, step = 0.01, group = "Parabolic SAR")
finish = input.float(0.2, "Maximum", minval = 0.0, step = 0.01, group = "Parabolic SAR")
showSar = input.bool(true, "Show PSAR of Kaufman AMA?", group = "UI Options")
showBl = input.bool(true, "Show Kaufman AMA Baseline?", group = "UI Options")
trendmatch = input.bool(true, "Activate Trend Confluence?", group = "UI Options")
colorbars55 = input.bool(true, "Color bars?", group = "UI Options")
kamaHi = _kama(high, period, kama_fastend, kama_slowend, jcount, efratiocalc)
kamaLo = _kama(low, period, kama_fastend, kama_slowend, jcount, efratiocalc)
kamaMid = (kamaHi + kamaLo) * 0.5
pine_sar(start, inc, max, cutoff, _high, _low, _close) =>
var float result = na
var float maxMin = na
var float acceleration = na
var bool isBelow = na
bool isFirstTrendBar = false
if bar_index < cutoff + cutoff * 0.2
if _close > _close[1]
isBelow := true
maxMin := _high
result := _low[1]
else
isBelow := false
maxMin := _low
result := 0
isFirstTrendBar := true
acceleration := start
result := result + acceleration * (maxMin - result)
if isBelow
if result > _low
isFirstTrendBar := true
isBelow := false
result := math.max(_high, maxMin)
maxMin := _low
acceleration := start
else
if result < _high
isFirstTrendBar := true
isBelow := true
result := math.min(_low, maxMin)
maxMin := _high
acceleration := start
if not isFirstTrendBar
if isBelow
if _high > maxMin
maxMin := _high
acceleration := math.min(acceleration + inc, max)
else
if _low < maxMin
maxMin := _low
acceleration := math.min(acceleration + inc, max)
if isBelow
result := math.min(result, _low[1])
if bar_index > 1
result := math.min(result, _low[2])
else
result := math.max(result, _high[1])
if bar_index > 1
result := math.max(result, _high[2])
[result, isBelow]
[sar, isbelow] = pine_sar(start, accel, finish, math.max(period, kama_fastend, kama_slowend), kamaHi, kamaLo, kamaMid)
kamaClose = _kama(blsrc, period, kama_fastend, kama_slowend, jcount, efratiocalc)
trendMatchColor = blsrc > kamaClose and isbelow ? greencolor : blsrc < kamaClose and not isbelow ? redcolor : color.white
regSarColor = isbelow ? greencolor : redcolor
regBlColor = blsrc > kamaClose ? greencolor : redcolor
//plot(showSar ? sar : na, "PSAR", style = plot.style_circles, linewidth = 3, color = trendmatch ? trendMatchColor : regSarColor)
//plot(showBl ? kamaClose : na, "Kaufman AMA Baseline", color = trendmatch ? trendMatchColor : regBlColor, linewidth = 2)
//barcolor(colorbars55 ? trendMatchColor : na)
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © loxx
//@version=5
indicator("..",
shorttitle='.',
overlay = true,
timeframe="",
timeframe_gaps = true,
max_polylines_count = 100,
max_lines_count = 500,
max_labels_count = 500,
precision=2)
//@version=5
multiplier = input.float(title='M', defval=0.5, minval=0.5, maxval=1.9)
timeframe = input.timeframe(title='Timeframe', defval='720')
barsc = input(title='BarsColor', defval=true)
o = request.security(syminfo.tickerid, timeframe, open)
c = request.security(syminfo.tickerid, timeframe, close)
atr33 = request.security(syminfo.tickerid, timeframe, ta.sma(ta.tr, 5))
anomalia = math.abs(o - c) > multiplier * atr33 ? 1 : 0
//barcolor(anomalia == 1 and barsc == 1 ? color.blue : na, 0)
dot = anomalia == 1 and c < o ? o + atr33 : anomalia == 1 and c > o ? o - atr33 : na
plotshape(dot, style=shape.square, color=color.new(color.blue, 0), location=location.absolute)
///////////////////////
//@version=5
// ATR
atrLength = input.int(title="ATR Length", defval=12, minval=1, tooltip="ATR period", group = "Average True Range -ATR-")
lookback = input.int(title="Lookback", defval=14, minval=1, tooltip="How many bars to look back for highs/lows", group = "Average True Range -ATR-")
ATRSizeInput = input.int(title="ATR percentage to use", defval=150, minval=0, tooltip="Stop loss distance times ATR multiplier. Must use full percentage number", group = "Average True Range -ATR-") / 100
atrValue = ta.atr(atrLength)
stopSize = atrValue * ATRSizeInput
lowStop = close - ta.lowest(low, lookback)
highStop = ta.highest(low, lookback) - close
// SUPERTREND
factor = input.float(3.0, "Factor", minval = 0.01, step = 0.01, group = "SuperTrend", tooltip = "The multiplier by which the ATR will get multiplied")
[supertrend, direction] = ta.supertrend(factor, atrLength)
supertrend := barstate.isfirst ? na : supertrend
// Get conditional Stop Loss DISTANCE from current price as ATR multiplier
long_stop_distance = close - stopSize < ta.lowest(low, lookback) ? stopSize : lowStop
short_stop_distance = close + stopSize > ta.lowest(low, lookback) ? stopSize : highStop
long_stop_level = close - long_stop_distance
short_stop_level = close + long_stop_distance
// BOLLINGER BANDS
lengthbb = input.int(20, minval=1, group = "Bollinger Bands")
mult = input.float(2.0, minval=0.001, maxval=50, title="StdDev", group = "Bollinger Bands")
offset = input.int(0, "Offset", minval = -500, maxval = 500)
[middle, upper, lower] = ta.bb(close, lengthbb, mult)
avg_stop = direction < 0 ? (supertrend + long_stop_level + lower) / 3 : (supertrend + short_stop_level + upper) / 3
plot(avg_stop, title = "Stop ", color = color.rgb(255, 255, 255, 00), style = plot.style_stepline, linewidth = 1, trackprice = true, precision = 2)
//////////////////////
PHP Code:
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// ~~ © Zeiierman {
//@version=5
indicator("TrendCylinder (Expo)", overlay = true)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ ToolTips {
t1 = "Volatility Period defines the length of the look-back period for calculating volatility. Higher values make the bands adapt more slowly to volatility changes. Lower values make them adapt more quickly."
t2 = "Trend Factor adjusts the sensitivity of the trend line to price movements. A higher value makes the trend line less sensitive and smoother. Lower values make it more sensitive and reactive to price changes."
t3 = "Trend Step controls how quickly the trend line adjusts to sudden price changes. Higher values cause slower adjustments, leading to smoother trend lines. Lower values result in quicker adjustments to sudden changes."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Inputs {
volatilityPeriod = input.int(100, title="Period", step=10, minval=2, maxval=1000, inline="vol", group="Volatility Settings", tooltip=t1)
trendFactor = input.float(9, step=0.1, title='Factor', minval = 0.1, inline="", group="Trend Settings", tooltip=t2)
trendStep = input.float(0.7, "Step", step=0.1,minval = 0.5, maxval = 5.0, inline="", group="Trend Settings", tooltip=t3)
color_trend = input.color(color.navy, title="Trend Line ", inline="trend", group="Style")
colorForUpperBand = input.color(color.new(#862458, 10), title="Upper Band", inline="band", group="Style")
colorForLowerBand = input.color(color.new(#493893, 10), title="Lower Band", inline="band", group="Style")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Initialize Variables
var float currentTrend = 0.0
var int trendDirection = 0
averageTrueRange = ta.atr(200)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Function to determine the trend direction
determineTrendDirection(direction) => direction - direction[1] > 0 ? 1 : (direction - direction[1] < 0 ? -1 : 0)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate Trend Direction
closingPrice = close
scaledStandardDev = (nz(averageTrueRange) * trendFactor)
trendDirection := determineTrendDirection(currentTrend) * int(scaledStandardDev)
priceTrendDiff = closingPrice - currentTrend > 0 ? closingPrice - currentTrend : currentTrend - closingPrice
reciprocalFactor = (scaledStandardDev * (1 / trendFactor)) * 1 / math.pow(2, 100)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate the Current Trend
trendAdjustment = priceTrendDiff > scaledStandardDev * trendStep ? math.avg(closingPrice, currentTrend) : trendDirection * reciprocalFactor + currentTrend
currentTrend := trendAdjustment
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate Upper and Lower Bands
upperBand = currentTrend + scaledStandardDev - averageTrueRange - ta.ema(ta.stdev(closingPrice, volatilityPeriod), 200)
lowerBand = currentTrend - scaledStandardDev + averageTrueRange + ta.ema(ta.stdev(closingPrice, volatilityPeriod), 200)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plot
isTrendConsistent = trendDirection == trendDirection[1]
colorForPlot = trendDirection == 1 ? color_trend : color_trend
plotTrend = plot(isTrendConsistent ? currentTrend : na, title="Trend Line", color=colorForPlot)
plotUpper = plot(isTrendConsistent ? upperBand : na, title="Upper Band", color = color.new(color.black, 100))
plotLower = plot(isTrendConsistent ? lowerBand : na, title="Lower Band", color = color.new(color.black, 100))
fill(plotUpper, plotTrend, top_color = colorForLowerBand, bottom_color =color.new(na,100), top_value = upperBand, bottom_value = currentTrend, title="Background Upper")
fill(plotTrend, plotLower, top_color = color.new(na,100), bottom_color = colorForUpperBand, top_value = currentTrend, bottom_value = lowerBand, title="Background Lower")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
PHP Code:
//@version=5
indicator(".",overlay=true,max_boxes_count=50,max_labels_count=50,max_lines_count=144,max_bars_back=1000)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
////////////
greencolor = #2dd204
redcolor = #f80435
_jfract(count)=>
window = math.ceil(count/2)
_hl1 = (ta.highest(high[window], window) - ta.lowest(low[window], window)) / window
_hl2 = (ta.highest(high, window) - ta.lowest(low, window)) / window
_hl = (ta.highest(high, count) - ta.lowest(low, count)) / count
_d = (math.log(_hl1 + _hl2) - math.log(_hl)) / math.log(2)
dim = _d < 1 ? 1 : _d > 2 ? 2 : _d
_kama(src, len, fast, slow, jcount, efratiocalc) =>
fastend = (2.0 /(fast + 1))
slowend = (2.0 /(slow + 1))
mom = math.abs(ta.change(src, len))
vola = math.sum(math.abs(ta.change(src)), len)
efratio = efratiocalc == "Regular" ? (vola != 0 ? mom / vola : 0) : math.min(2.0-_jfract(jcount), 1.0)
alpha = math.pow(efratio * (fastend - slowend) + slowend, 2)
kama = 0.0
kama := alpha * src + (1 - alpha) * nz(kama[1], src)
kama
blsrc = input.source(hl2, "Source", group = "Kaufman AMA Settings")
period = input.int(10, "Period", minval = 0, group = "Kaufman AMA Settings")
kama_fastend = input.float(2, "Kaufman AMA Fast-end Period", minval = 0.0, group = "Kaufman AMA Settings")
kama_slowend = input.float(30, "Kaufman AMA Slow-end Period", minval = 0.0, group = "Kaufman AMA Settings")
efratiocalc = input.string("Regular", "Efficiency Ratio Type", options = ["Regular", "Jurik Fractal Dimension Adaptive"], group = "Kaufman AMA Settings")
jcount = input.int(defval=2, title="Jurik Fractal Dimension Count ", group = "Kaufman AMA Settings")
start = input.float(0, "Start", minval = 0.0, step = 0.01, group = "Parabolic SAR")
accel = input.float(0.1, "Acceleration", minval = 0.0, step = 0.01, group = "Parabolic SAR")
finish = input.float(0.3, "Maximum", minval = 0.0, step = 0.01, group = "Parabolic SAR")
showSar = input.bool(true, "Show PSAR of Kaufman AMA?", group = "UI Options")
showBl = input.bool(true, "Show Kaufman AMA Baseline?", group = "UI Options")
trendmatch = input.bool(true, "Activate Trend Confluence?", group = "UI Options")
colorbars55 = input.bool(true, "Color bars?", group = "UI Options")
kamaHi = _kama(high, period, kama_fastend, kama_slowend, jcount, efratiocalc)
kamaLo = _kama(low, period, kama_fastend, kama_slowend, jcount, efratiocalc)
kamaMid = (kamaHi + kamaLo) * 0.5
pine_sar(start, inc, max, cutoff, _high, _low, _close) =>
var float result = na
var float maxMin = na
var float acceleration = na
var bool isBelow = na
bool isFirstTrendBar = false
if bar_index < cutoff + cutoff * 0.2
if _close > _close[1]
isBelow := true
maxMin := _high
result := _low[1]
else
isBelow := false
maxMin := _low
result := 0
isFirstTrendBar := true
acceleration := start
result := result + acceleration * (maxMin - result)
if isBelow
if result > _low
isFirstTrendBar := true
isBelow := false
result := math.max(_high, maxMin)
maxMin := _low
acceleration := start
else
if result < _high
isFirstTrendBar := true
isBelow := true
result := math.min(_low, maxMin)
maxMin := _high
acceleration := start
if not isFirstTrendBar
if isBelow
if _high > maxMin
maxMin := _high
acceleration := math.min(acceleration + inc, max)
else
if _low < maxMin
maxMin := _low
acceleration := math.min(acceleration + inc, max)
if isBelow
result := math.min(result, _low[1])
if bar_index > 1
result := math.min(result, _low[2])
else
result := math.max(result, _high[1])
if bar_index > 1
result := math.max(result, _high[2])
[result, isBelow]
[sar, isbelow] = pine_sar(start, accel, finish, math.max(period, kama_fastend, kama_slowend), kamaHi, kamaLo, kamaMid)
kamaClose = _kama(blsrc, period, kama_fastend, kama_slowend, jcount, efratiocalc)
trendMatchColor = blsrc > kamaClose and isbelow ? greencolor : blsrc < kamaClose and not isbelow ? redcolor : color.rgb(255, 255, 255, 00)
regSarColor = isbelow ? greencolor : redcolor
regBlColor = blsrc > kamaClose ? greencolor : redcolor
plot(showSar ? sar : na, "Trend", style = plot.style_stepline, linewidth = 2, color = trendmatch ? trendMatchColor : regSarColor)
barcolor(colorbars55 ? trendMatchColor : na)
/////////////////////
s = input.source(ohlc4)
lp = math.log(s)
n = input.int(3)
rollingMean(src,length) =>
mean = 0.00
mean := (nz(mean[1]) * (length-1) + src)/length
stdev(src,length)=>
sd=math.sqrt(rollingMean(src*src,length)-rollingMean(src,length)*rollingMean(src,length))
bandwidth(sd,length) =>
h = 0.00
h := 1.06*sd*math.pow(length,-float(1)/5)
rsd = stdev(lp,n)
rm = rollingMean(lp,n)
plot(math.exp(rm),color=color.rgb(255, 255, 255, 100), title="Stop")
PHP Code:
//@version=5
indicator('.', shorttitle='.', overlay=true, max_polylines_count = 100, max_lines_count = 100, max_labels_count = 100, precision=2)
length = input.int(20, "TTM Squeeze Length")
//BOLLINGER BANDS
BB_mult = input.float(2.0, "Bollinger Band STD Multiplier")
BB_basis = ta.sma(close, length)
dev = BB_mult * ta.stdev(close, length)
BB_upper = BB_basis + dev
BB_lower = BB_basis - dev
atr = ta.atr(14)
//KELTNER CHANNELS
KC_mult_high = input.float(1.0, "Keltner Channel #1")
KC_mult_mid = input.float(1.5, "Keltner Channel #2")
KC_mult_low = input.float(2.0, "Keltner Channel #3")
KC_basis = ta.sma(close, length)
devKC = ta.sma(ta.tr, length)
KC_upper_high = KC_basis + devKC * KC_mult_high
KC_lower_high = KC_basis - devKC * KC_mult_high
KC_upper_mid = KC_basis + devKC * KC_mult_mid
KC_lower_mid = KC_basis - devKC * KC_mult_mid
KC_upper_low = KC_basis + devKC * KC_mult_low
KC_lower_low = KC_basis - devKC * KC_mult_low
//SQUEEZE CONDITIONS
NoSqz = BB_lower < KC_lower_low or BB_upper > KC_upper_low //NO SQUEEZE: GREEN
LowSqz = BB_lower >= KC_lower_low or BB_upper <= KC_upper_low //LOW COMPRESSION: BLACK
MidSqz = BB_lower >= KC_lower_mid or BB_upper <= KC_upper_mid //MID COMPRESSION: RED
HighSqz = BB_lower >= KC_lower_high or BB_upper <= KC_upper_high //HIGH COMPRESSION: ORANGE
//MOMENTUM OSCILLATOR
mom = ta.linreg(close - math.avg(math.avg(ta.highest(high, length), ta.lowest(low, length)), ta.sma(close, length)), length, 0)
//MOMENTUM HISTOGRAM COLOR
iff_1 = mom > nz(mom[1]) ? color.new(color.aqua, 0) : color.new(#2962ff, 0)
iff_2 = mom < nz(mom[1]) ? color.new(color.red, 0) : color.new(color.yellow, 0)
mom_color = mom > 0 ? iff_1 : iff_2
// Bullsqueeze and Bearsqueeze Conditions
bullsqueeze = ((NoSqz and mom_color == color.new(color.aqua, 0)) or (mom_color == color.new(color.aqua, 0) and mom_color[1] == color.new(color.red, 0)))
bearsqueeze = ((NoSqz and mom_color == color.new(color.red, 0)) or (mom_color == color.new(color.red, 0) and mom_color[1] == color.new(color.aqua, 0)))
// BULL AND BEAR WATCH OUT Conditions
buyConf = (mom_color == color.new(color.aqua, 0) and mom_color[1] == color.new(color.yellow, 0)) and not bullsqueeze
sellConf = (mom_color == color.new(color.red, 0) and mom_color[1] == color.new(#2962ff, 0)) and not bearsqueeze
// User inputs for colors and widths related to the BAND
userColorBullish = input.color(color.rgb(247, 223, 2), "Bullish Band Color", group= "Customize BAND")
userColorBearish = input.color(color.black, "Bearish Band Color",group= "Customize BAND")
bandWidthMultiplier = input.float(2.0, "Band Width Multiplier", minval=1.0,group= "Customize BAND")
userWidth = input.int(2, "Band Width", minval=1,group= "Customize BAND")
// Adjusted band calculations
upperBand = high + (atr * bandWidthMultiplier)
lowerBand = low - (atr * bandWidthMultiplier)
// Initialize a color variable for the band
var color bandColor = na
// Initialize a variable to store the previous band color
var color prevBandColor = na
// Update the previous band color for the next bar
prevBandColor := bandColor[1]
// Create variables to store the previous squeeze state
var bool prevBullSqueeze = false
var bool prevBearSqueeze = false
// Update the previous squeeze state at the beginning of each new bar
if (barstate.isnew)
prevBullSqueeze := bandColor == color.new(userColorBullish, 0)
prevBearSqueeze := bandColor == color.new(userColorBearish, 100)
// Determine the band color based on custom conditions
if (bullsqueeze)
bandColor := color.new(userColorBullish, 0)
else if (bearsqueeze)
bandColor := color.new(userColorBearish, 100)
else if (sellConf and prevBullSqueeze)
bandColor := color.new(userColorBullish, 50)
else if (sellConf)
bandColor := color.new(userColorBearish, 100)
else if (buyConf and prevBearSqueeze)
bandColor := color.new(userColorBearish, 100)
else if (buyConf)
bandColor := color.new(userColorBullish, 50)
// Plot the bands and store the plot references
upperBandPlot = plot(upperBand, "H", color=bandColor, linewidth=userWidth)
lowerBandPlot = plot(lowerBand, "L", color=bandColor, linewidth=userWidth)
///////////////////////////////
//@version=5
dual_color=false
var bar_value= 1 //(1-16)
currentHigh = high
previousHigh = high[1]
currentClose = close
previousClose = close[1]
currentLow = low
previousLow = low[1]
//
condition1 = currentHigh > previousHigh and currentClose > previousClose and currentLow > previousLow
condition2 = currentHigh < previousHigh and currentClose > previousClose and currentLow > previousLow
condition3 = currentHigh > previousHigh and currentClose > previousClose and currentLow < previousLow
condition4 = currentHigh < previousHigh and currentClose > previousClose and currentLow < previousLow
//--------------------------------------------------------
condition5 = currentHigh > previousHigh and currentClose < previousClose and currentLow > previousLow
condition6 = currentHigh < previousHigh and currentClose < previousClose and currentLow > previousLow
condition7 = currentHigh > previousHigh and currentClose < previousClose and currentLow < previousLow
condition8 = currentHigh < previousHigh and currentClose < previousClose and currentLow < previousLow
open_up = close > open[1]
open_down = close < open[1]
switch
condition1 and open_up => bar_value:=16
condition1 and open_down => bar_value:=15
condition2 and open_up => bar_value:=14
condition2 and open_down => bar_value:=13
condition3 and open_up => bar_value:=12
condition3 and open_down => bar_value:=11
condition4 and open_up => bar_value:=10
condition4 and open_down => bar_value:=9
condition5 and open_up => bar_value:=8
condition5 and open_down => bar_value:=7
condition6 and open_up => bar_value:=6
condition6 and open_down => bar_value:=5
condition7 and open_up => bar_value:=4
condition7 and open_down => bar_value:=3
condition8 and open_up => bar_value:=2
condition8 and open_down => bar_value:=1
//plot(bar_value,display = display.none,title="Bar Value")
barcolor(condition1 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H+")
barcolor(condition2 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L+H-")
barcolor(condition3 and not dual_color ? color.rgb(247, 223, 2) : na, title="C+L-H+")
barcolor(condition4 and not dual_color ? color.rgb(252, 223, 2) : na, title="C+L-H-")
//--------------------------------------------------------------------------
barcolor(condition5 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H+")
barcolor(condition6 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L+H-")
barcolor(condition7 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H+")
barcolor(condition8 and not dual_color ? color.rgb(213, 4, 250) : na, title="C-L-H-")
///////////////////////
//@version=5
type bar
float o = open
float h = high
float l = low
float c = close
int i = bar_index
type trend
float h = na
float l = na
type scythe
polyline a = na
line b = na
type target
float u = na
float l = na
float p = na
int d = 0
bool r = false
line v = na
line h = na
label e = na
type alerts
bool u = na
bool d = na
bool b = na
bool s = na
type prompt
string s = ''
bool c = false
method notify(prompt p) =>
if p.c
alert(p.s, alert.freq_once_per_bar_close)
method any(alerts a) =>
string s = switch
a.s => 'Target Reached '
a.b => 'Target Invalidated'
a.u => 'Breakout '
a.d => 'Breakdown'
=> na
prompt.new(s, not na(s))
method atr(bar b, simple int len = 1) =>
float tr =
na(b.h[1]) ?
b.h - b.l :
math.max(
math.max(
b.h - b.l,
math.abs(b.h - b.c[1])),
math.abs (b.l - b.c[1]))
len == 1 ? tr : ta.rma(tr, len)
method piv(trend t) =>
bool b = switch
na(t.h) and na(t.l) => false
=> true
b
method blade(array<chart.point> a, bool p, simple color u, simple color d) =>
polyline.new(a, false, true, xloc.bar_index, p ? d : u, p ? color.new(d, 80) : color.new(u, 80))
method handle(bar b, trend t, float s) =>
line l = switch
not na(t.l) =>
line.new(b.i, b.h + s, b.i, b.l , xloc.bar_index, extend.none, #9c4b11, line.style_solid, 3)
not na(t.h) =>
line.new(b.i, b.h , b.i, b.l - s, xloc.bar_index, extend.none, #9c4b11, line.style_solid, 3)
l
method goal(target t, bar b, simple int len) =>
t.v := line .new(b.i, b.c, b.i , t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
t.h := line .new(b.i, t.p, b.i + len, t.p, xloc.bar_index, extend.none, chart.fg_color, line.style_dashed)
//t.e := label.new(b.i + len, t.p, "HEDEF", xloc.bar_index, yloc.price, #f0a71f78, label.style_label_left, chart.fg_color, size.normal)
method cu(target t, bar b) =>
t.l[1] < b.c[1] and t.l > b.c
method co(target t, bar b) =>
t.u[1] > b.c[1] and t.u < b.c
method cr(target t, bar b) =>
((t.d == 1 and b.c > t.p) or
(t.d == -1 and b.c < t.p))
method reached(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#4caf4f78)
t.e.set_text ('KAR-AL' )
method failed(target t, bar b) =>
t.h.set_xy2(b.i, t.h.get_y2())
t.e.set_xy (b.i, t.h.get_y2())
t.e.set_color(#a53a3a78)
t.e.set_text ('GEÇERSİZ' )
const string ts = 'Controls how restrained the target calculation is, higher values will result in tighter targets.'
const string tb = 'Adjusts the length of the scythes blade'
const string tp = 'Swing detection length'
const string gs = 'Scythes', const string gt = 'Targets', const string gu = 'UI Options'
len = input.int (20 , "Pivot Length" , 20, 100, 1 , tp, group = gs)
ext = input.int (40 , "Scythe Length" , 20, 200, 1 , tb, group = gs)
sen = input.int (50 , "Sensitivity %", 0 , 100, 10, ts, group = gt)
bts = input.bool (true , "Display" , group = gt)
bbs = input.bool (true , "Breakouts" , group = gu)
colu = input.color(#eee7df, "" , inline = '1', group = gu)
cold = input.color(#c71313, "" , inline = '1', group = gu)
bar b = bar .new( )
float s = b .atr( len) / len
trend t = trend.new(
ta.pivothigh(len, len),
ta.pivotlow (len, len))
var target g = target.new ()
var map<int, float> u = map .new<int, float>()
var map<int, float> l = map .new<int, float>()
if t.piv()
array<chart.point> a = array.new<chart.point>()
bar z = b[len]
bool p = na(t.l)
for i = 0 to ext - 1
float c = s * i + s * math.pow(i, 2) / ext
a.push(chart.point.from_index(z.i + i, (p ? (z.h - c) : (z.l + c))))
a.push(chart.point.from_index(z.i, (p ? (z.h - s * ext / 5) : (z.l + s * ext / 5))))
switch
not na(t.l) =>
l.clear()
for point in a
l.put(point.index, point.price)
not na(t.h) =>
u.clear()
for point in a
u.put(point.index, point.price)
scythe n = scythe.new(a.blade(p, colu, cold), z.handle(t, s * len))
g.u := u.contains(b.i) ? u.get(b.i) : na
g.l := l.contains(b.i) ? l.get(b.i) : na
bool ucon = false
bool dcon = false
bool bcon = false
bool scon = false
if g.cr(b) and not g.r and bts
g.reached(b)
g.r := true
scon := true
if g.co(b) and bts
if not g.r
g.failed(b)
bcon := true
else
ucon := true
g.r := false
g.d := 1
g.p := b.c + s * ext * (2 - sen / 100)
g.goal(b, len)
if g.cu(b) and bts
if not g.r
g.failed(b)
bcon := true
else
dcon := true
g.r := false
g.d := -1
g.p := b.c - s * ext * (2 - sen / 100)
g.goal(b, len)
alerts a = alerts.new(
ucon,
dcon,
bcon,
scon)
plotshape(not na(t.l) ? (b[len]).l + s * len / 5 : na, "ÇIPA", shape.diamond, location.absolute, colu, -len, size = size.normal)
plotshape(not na(t.h) ? (b[len]).h - s * len / 5 : na, "TIRPAN", shape.diamond, location.absolute, cold, -len, size = size.normal)
//plotshape(bbs and a.d, "KIRILIM", shape.labeldown, location.abovebar, color.new(cold, 60), 0, 'AK', chart.fg_color, size = size.normal)
//plotshape(bbs and a.u, "KIRILIM", shape.labelup , location.belowbar, color.new(colu, 60), 0, 'YK', chart.fg_color, size = size.normal)
//alertcondition(a.b, 'Target Reached ', 'Target Reached ')
//alertcondition(a.s, 'Target Invalidated', 'Target Invalidated')
//alertcondition(a.u, 'Breakout ' , 'Breakout ' )
//alertcondition(a.d, 'Breakdown' , 'Breakdown' )
a.any().notify()
///////////////////////////////
//@version=5
OPEN = request.security(syminfo.tickerid, '60', open)
//ADR L
dayrange = high - low
r1 = request.security(syminfo.tickerid, '60', dayrange[1])
r2 = request.security(syminfo.tickerid, '60', dayrange[2])
r3 = request.security(syminfo.tickerid, '60', dayrange[3])
r4 = request.security(syminfo.tickerid, '60', dayrange[4])
r5 = request.security(syminfo.tickerid, '60', dayrange[5])
r6 = request.security(syminfo.tickerid, '60', dayrange[6])
r7 = request.security(syminfo.tickerid, '60', dayrange[7])
r8 = request.security(syminfo.tickerid, '60', dayrange[8])
r9 = request.security(syminfo.tickerid, '60', dayrange[9])
r10 = request.security(syminfo.tickerid, '60', dayrange[10])
adr_10 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10) / 10
adr_9 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9) / 9
adr_8 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8) / 8
adr_7 = (r1 + r2 + r3 + r4 + r5 + r6 + r7) / 7
adr_6 = (r1 + r2 + r3 + r4 + r5 + r6) / 6
adr_5 = (r1 + r2 + r3 + r4 + r5) / 5
adr_4 = (r1 + r2 + r3 + r4) / 4
adr_3 = (r1 + r2 + r3) / 3
adr_2 = (r1 + r2) / 2
adr_1 = r1
//plot
adrhigh10 = plot(OPEN + adr_10 / 2, title='HH', style=plot.style_linebr, color=color.new(#ff9900, 100), linewidth=1)
adrlow10 = plot(OPEN - adr_10 / 2, title='HL', style=plot.style_linebr, color=color.new(#ff9900, 100), linewidth=1)
////////////////////////
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// ~~ © Zeiierman {
//@version=5
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ ToolTips {
t1 = "Volatility Period defines the length of the look-back period for calculating volatility. Higher values make the bands adapt more slowly to volatility changes. Lower values make them adapt more quickly."
t2 = "Trend Factor adjusts the sensitivity of the trend line to price movements. A higher value makes the trend line less sensitive and smoother. Lower values make it more sensitive and reactive to price changes."
t3 = "Trend Step controls how quickly the trend line adjusts to sudden price changes. Higher values cause slower adjustments, leading to smoother trend lines. Lower values result in quicker adjustments to sudden changes."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Inputs {
volatilityPeriod = input.int(100, title="Period", step=10, minval=2, maxval=1000, inline="vol", group="Volatility Settings", tooltip=t1)
trendFactor = input.float(9, step=0.1, title='Factor', minval = 0.1, inline="", group="Trend Settings", tooltip=t2)
trendStep = input.float(0.7, "Step", step=0.1,minval = 0.5, maxval = 5.0, inline="", group="Trend Settings", tooltip=t3)
color_trend = input.color(color.navy, title="Trend Line ", inline="trend", group="Style")
colorForUpperBand = input.color(color.new(#862458, 10), title="Upper Band", inline="band", group="Style")
colorForLowerBand = input.color(color.new(#493893, 10), title="Lower Band", inline="band", group="Style")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Initialize Variables
var float currentTrend = 0.0
var int trendDirection = 0
averageTrueRange = ta.atr(200)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Function to determine the trend direction
determineTrendDirection(direction) => direction - direction[1] > 0 ? 1 : (direction - direction[1] < 0 ? -1 : 0)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate Trend Direction
closingPrice = close
scaledStandardDev = (nz(averageTrueRange) * trendFactor)
trendDirection := determineTrendDirection(currentTrend) * int(scaledStandardDev)
priceTrendDiff = closingPrice - currentTrend > 0 ? closingPrice - currentTrend : currentTrend - closingPrice
reciprocalFactor = (scaledStandardDev * (1 / trendFactor)) * 1 / math.pow(2, 100)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate the Current Trend
trendAdjustment = priceTrendDiff > scaledStandardDev * trendStep ? math.avg(closingPrice, currentTrend) : trendDirection * reciprocalFactor + currentTrend
currentTrend := trendAdjustment
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Calculate Upper and Lower Bands
upperBand88 = currentTrend + scaledStandardDev - averageTrueRange - ta.ema(ta.stdev(closingPrice, volatilityPeriod), 200)
lowerBand88 = currentTrend - scaledStandardDev + averageTrueRange + ta.ema(ta.stdev(closingPrice, volatilityPeriod), 200)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plot
isTrendConsistent = trendDirection == trendDirection[1]
colorForPlot = trendDirection == 1 ? color_trend : color_trend
plotTrend = plot(isTrendConsistent ? currentTrend : na, title="Trend ", color = color.new(na, 00))
plotUpper = plot(isTrendConsistent ? upperBand88 : na, title="Upper ", color = color.new(color.black, 00))
plotLower = plot(isTrendConsistent ? lowerBand88 : na, title="Lower ", color = color.new(color.black, 00))
fill(plotUpper, plotTrend, top_color = colorForLowerBand, bottom_color =color.new(na,100), top_value = upperBand88, bottom_value = currentTrend, title="Background Upper")
fill(plotTrend, plotLower, top_color = color.new(na,100), bottom_color = colorForUpperBand, top_value = currentTrend, bottom_value = lowerBand88, title="Background Lower")
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
//@version=5
interval_to_len = timeframe.multiplier * (timeframe.isdaily ? 1440 : timeframe.isweekly ? 1440 * 7 : timeframe.ismonthly ? 1440 * 30 : 1)
ep_interval = 60 * input.int(5, minval=1, title='Extreme Point Interval (hours)')
len99 = input.int(5, minval=1, title='Length')
MA_type = input.string('Exponential', title='Moving Average Type', options=['Simple', 'Exponential', 'Smoothed'])
src = close
ep_len = math.ceil(ep_interval / interval_to_len)
_highest = ta.highest(high, ep_len)
_lowest = ta.lowest(low, ep_len)
MA = if MA_type == 'Simple'
ta.sma(src, len99)
else
if MA_type == 'Smoothed'
ta.rma(src, len99)
else
ta.ema(src, len99)
SR = src
trend = math.sign(nz(src[1]) - nz(SR[1]))
SR := nz(SR[1], SR) + trend * math.abs(nz(MA, src) - nz(MA[1], MA))
SR := src < SR and trend > 0 ? _highest : src > SR and trend < 0 ? _lowest : SR
trend := math.sign(src - SR)
plot(SR, color=trend != trend[1] ? na : trend > 0 ? #65D25BFF : #FE6B69FF,linewidth = 4, title='.')
////////////////////
//@version=5
// inputs
sdLength = input.int(3, title = 'Price-Action Length', minval = 2, maxval = 100)
labelType = input.string('Repaint', title = 'Label Type', options = ['Repaint', 'No-Repaint'])
candleType = input.string('Fill Only', title = 'Candle Color Type', options = ['Entire Candle', 'Fill Only'])
bullCSS = input.color(color.lime, title = 'Bull')
bearCSS = input.color(color.rgb(255, 0, 0), title = 'Bear')
neutCSS = input.color(color.yellow, title = 'Neutral')
useTrendTable = input.bool(true, title = 'Enabled', group = 'MTF Trend')
use_mtf1 = input.bool(true, title = 'MTF 1', group = 'MTF Trend', inline = '1')
mtf_1 = input.timeframe("1", title = '', group = 'MTF Trend', inline = '1')
use_mtf2 = input.bool(true, title = 'MTF 2', group = 'MTF Trend', inline = '2')
mtf_2 = input.timeframe("3", title = '', group = 'MTF Trend', inline = '2')
use_mtf3 = input.bool(true, title = 'MTF 3', group = 'MTF Trend', inline = '3')
mtf_3 = input.timeframe("5", title = '', group = 'MTF Trend', inline = '3')
use_mtf4 = input.bool(true, title = 'MTF 4', group = 'MTF Trend', inline = '4')
mtf_4 = input.timeframe("15", title = '', group = 'MTF Trend', inline = '4')
use_mtf5 = input.bool(true, title = 'MTF 5', group = 'MTF Trend', inline = '5')
mtf_5 = input.timeframe("60", title = '', group = 'MTF Trend', inline = '5')
// functions
f_getSwingValues(sdLength, offset) =>
sh = ta.pivothigh(high, sdLength, sdLength)
sl = ta.pivotlow(low, sdLength, sdLength)
csh = ta.valuewhen(not na(sh), high[sdLength], 0)
csl = ta.valuewhen(not na(sl), low[sdLength], 0)
psh = ta.valuewhen(not na(sh), high[sdLength], 1)
psl = ta.valuewhen(not na(sl), low[sdLength], 1)
hh = sh >= psh
lh = sh < psh
ll = sl <= psl
hl = sl > psl
var int trend = na
trend := ((hh and high >= psh) or close > csh) ? 1 : ((ll and low <= psl) or close < csl) ? -1 : lh or hl ? 0 : trend[1]
var int last_signal = na
last_signal := hh ? 2 : lh ? -1 : ll ? -2 : hl ? 1 : last_signal[1]
[sh[offset], sl[offset], psh[offset], psl[offset], csh[offset], csl[offset], hh[offset], lh[offset], ll[offset], hl[offset], trend[offset], last_signal[offset]]
// calculate chart tf
[sh, sl, psh, psl, csh, csl, hh, lh, ll, hl, trend45, last_signal] =
request.security(syminfo.tickerid, "", f_getSwingValues(sdLength, 0))
plotshape(ll and not na(sl), text="LL", title="Lower Low", style=shape.labelup, display = display.none,
color=bearCSS, textcolor=color.black, location=location.belowbar, offset = labelType == 'Repaint' ? -sdLength : 0)
plotshape(hl and not na(sl), text="HL", title="Higher Low", style=shape.labelup, display = display.none,
color=neutCSS, textcolor=color.black, location=location.belowbar, offset = labelType == 'Repaint' ? -sdLength : 0)
plotshape(hh and not na(sh), text="HH", title="Higher High", style=shape.labeldown, display = display.none,
color=bullCSS, textcolor=color.black, location=location.abovebar, offset = labelType == 'Repaint' ? -sdLength : 0)
plotshape(lh and not na(sh), text="LH", title="Lower High", style=shape.labeldown, display = display.none,
color=neutCSS, textcolor=color.black, location=location.abovebar, offset = labelType == 'Repaint' ? -sdLength : 0)
barCSS = trend45 == 1 ? bullCSS
: trend45 == -1 ? bearCSS
: neutCSS
barcolor(candleType != 'Fill Only' ? na
: barCSS, editable = false)
plotcandle(open, high, low, close, title = 'Price Action Candles',
color = barCSS, wickcolor = barCSS, bordercolor = barCSS,
display = candleType == 'Entire Candle' ? display.all : display.none, editable = false)
// calculate mtf
f_ltf_values(tf) =>
var int returnTrend = na
adjusted_timeframe = timeframe.in_seconds(tf) >= timeframe.in_seconds() ? '' : tf
[ltf_sh, ltf_sl, ltf_psh, ltf_psl, ltf_csh, ltf_csl, ltf_hh, ltf_lh, ltf_ll, ltf_hl, ltf_trend, ltf_last_signal] =
request.security_lower_tf(syminfo.tickerid, adjusted_timeframe, f_getSwingValues(sdLength, 0))
if array.size(ltf_trend) > 0
returnTrend := array.last(ltf_trend)
else
returnTrend := 0
returnTrend
f_htf_values(tf) =>
[htf_sh, htf_sl, htf_psh, htf_psl, htf_csh, htf_csl, htf_hh, htf_lh, htf_ll, htf_hl, htf_trend, htf_last_signal] =
request.security(syminfo.tickerid, tf, f_getSwingValues(sdLength, 1), lookahead = barmerge.lookahead_on)
htf_trend
f_sametf_values() =>
[sametf_sh, sametf_sl, sametf_psh, sametf_psl, sametf_csh, sametf_csl, sametf_hh, sametf_lh, sametf_ll, sametf_hl, sametf_trend, sametf_last_signal] =
f_getSwingValues(sdLength, 0)
sametf_trend
var int mtf1_trend = na
var int mtf2_trend = na
var int mtf3_trend = na
var int mtf4_trend = na
var int mtf5_trend = na
if barstate.islast
if use_mtf1
if timeframe.in_seconds() == timeframe.in_seconds(mtf_1)
mtf1_trend := f_sametf_values()
else if timeframe.in_seconds() > timeframe.in_seconds(mtf_1)
mtf1_trend := f_ltf_values(mtf_1)
else
mtf1_trend := f_htf_values(mtf_1)
if use_mtf2
if timeframe.in_seconds() == timeframe.in_seconds(mtf_2)
mtf2_trend := f_sametf_values()
else if timeframe.in_seconds() > timeframe.in_seconds(mtf_2)
mtf2_trend := f_ltf_values(mtf_2)
else
mtf2_trend := f_htf_values(mtf_2)
if use_mtf3
if timeframe.in_seconds() == timeframe.in_seconds(mtf_3)
mtf3_trend := f_sametf_values()
else if timeframe.in_seconds() > timeframe.in_seconds(mtf_3)
mtf3_trend := f_ltf_values(mtf_3)
else
mtf3_trend := f_htf_values(mtf_3)
if use_mtf4
if timeframe.in_seconds() == timeframe.in_seconds(mtf_4)
mtf4_trend := f_sametf_values()
else if timeframe.in_seconds() > timeframe.in_seconds(mtf_4)
mtf4_trend := f_ltf_values(mtf_4)
else
mtf4_trend := f_htf_values(mtf_4)
if use_mtf5
if timeframe.in_seconds() == timeframe.in_seconds(mtf_5)
mtf5_trend := f_sametf_values()
else if timeframe.in_seconds() > timeframe.in_seconds(mtf_5)
mtf5_trend := f_ltf_values(mtf_5)
else
mtf5_trend := f_htf_values(mtf_5)
// table
if barstate.islast and useTrendTable
var trendTable = table.new(position = position.bottom_right, columns = 5, rows = 1, border_width = 1, border_color = color.black, frame_width = 2, frame_color = color.black)
if use_mtf1
table.cell(trendTable, 0, 0, text = str.tostring(mtf_1), text_color = color.black,
bgcolor = color.new(mtf1_trend == 1 ? bullCSS : mtf1_trend == -1 ? bearCSS : neutCSS, 0))
if use_mtf2
table.cell(trendTable, 1, 0, text = str.tostring(mtf_2), text_color = color.black,
bgcolor = color.new(mtf2_trend == 1 ? bullCSS : mtf2_trend == -1 ? bearCSS : neutCSS, 0))
if use_mtf3
table.cell(trendTable, 2, 0, text = str.tostring(mtf_3), text_color = color.black,
bgcolor = color.new(mtf3_trend == 1 ? bullCSS : mtf3_trend == -1 ? bearCSS : neutCSS, 0))
if use_mtf4
table.cell(trendTable, 3, 0, text = str.tostring(mtf_4), text_color = color.black,
bgcolor = color.new(mtf4_trend == 1 ? bullCSS : mtf4_trend == -1 ? bearCSS : neutCSS, 0))
if use_mtf5
table.cell(trendTable, 4, 0, text = str.tostring(mtf_5), text_color = color.black,
bgcolor = color.new(mtf5_trend == 1 ? bullCSS : mtf5_trend == -1 ? bearCSS : neutCSS, 0))
/////////////////////////////////////////
bugünkü mumu eğer ki en tepede yapsa benim için "sat" demek olurdu. Düzeltme aşamasında bu mumu normal kabul ediyorum.
Piyasa değeri 1 milyar $ civarında satıcı buluyor genelde.
Endeks çok bozmazsa 700-600 aralığında konsolide olmaya devam edecek gibi
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © paaax
//@version=5
indicator('[PX] MTF Overview', overlay = true)
// { Functions
f_getPosition(_pos) =>
ret = position.bottom_center
if _pos == 'Top Center'
ret := position.top_center
ret
if _pos == 'Top Right'
ret := position.top_right
ret
if _pos == 'Middle Left'
ret := position.middle_left
ret
if _pos == 'Middle Center'
ret := position.middle_center
ret
if _pos == 'Middle Right'
ret := position.middle_right
ret
if _pos == 'Bottom Left'
ret := position.bottom_left
ret
if _pos == 'Bottom Center'
ret := position.bottom_center
ret
if _pos == 'Bottom Right'
ret := position.bottom_right
ret
ret
f_normalize(_src, _min, _max) => //@PineCoders
var _historicMin = 10e10
var _historicMax = -10e10
_historicMin := math.min(nz(_src, _historicMin), _historicMin)
_historicMax := math.max(nz(_src, _historicMax), _historicMax)
_min + (_max - _min) * (_src - _historicMin) / math.max(_historicMax - _historicMin, 10e-10)
f_security(_sym, _res, _src, _rep) => //@PineCoders
request.security(_sym, _res, _src[not _rep and barstate.isrealtime ? 1 : 0])[_rep or barstate.isrealtime ? 0 : 1]
//} Functions
// { Inputs
bool i_repaint = input.bool(false, 'Repaint', group='MTF')
string i_timeframe1 = input.timeframe('60', 'Timeframe 1', group='MTF')
string i_timeframe2 = input.timeframe('15', 'Timeframe 2', group='MTF')
string i_timeframe3 = input.timeframe('5', 'Timeframe 3', group='MTF')
string i_pos = input.string(defval='Bottom Center', title='Table Position', options=['Top Left', 'Top Center', 'Top Right', 'Middle Left', 'Middle Center', 'Middle Right', 'Bottom Left', 'Bottom Center', 'Bottom Right'], group='Layout')
color i_col = input.color(defval=color.white, title='Label Color', group='Layout')
int i_rsiLen = input.int(14, 'RSI Length', group='Momentum')
int i_atrLen = input.int(14, 'ATR Length', group='Volatility')
float i_start = input.float(0, 'PSAR', group='Trend', inline='1')
float i_increment = input.float(0.01, '', group='Trend', inline='1')
float i_maximum = input.float(0.1, '', group='Trend', inline='1')
// } Inputs
// { Calculations
rsi = ta.rsi(close, i_rsiLen)
natr = f_normalize(ta.atr(i_atrLen), 0, 100)
out = ta.sar(i_start, i_increment, i_maximum)
// } Calculations
rsi1 = f_security(syminfo.tickerid, i_timeframe1, rsi, i_repaint)
prevRsi1 = f_security(syminfo.tickerid, i_timeframe1, rsi[1], i_repaint)
rsi2 = f_security(syminfo.tickerid, i_timeframe2, rsi, i_repaint)
prevRsi2 = f_security(syminfo.tickerid, i_timeframe2, rsi[1], i_repaint)
rsi3 = f_security(syminfo.tickerid, i_timeframe3, rsi, i_repaint)
prevRsi3 = f_security(syminfo.tickerid, i_timeframe3, rsi[1], i_repaint)
atr1 = f_security(syminfo.tickerid, i_timeframe1, natr, i_repaint)
prevAtr1 = f_security(syminfo.tickerid, i_timeframe1, natr[1], i_repaint)
atr2 = f_security(syminfo.tickerid, i_timeframe2, natr, i_repaint)
prevAtr2 = f_security(syminfo.tickerid, i_timeframe2, natr[1], i_repaint)
atr3 = f_security(syminfo.tickerid, i_timeframe3, natr, i_repaint)
prevAtr3 = f_security(syminfo.tickerid, i_timeframe3, natr[1], i_repaint)
trend1 = f_security(syminfo.tickerid, i_timeframe1, out, i_repaint)
prevTrend1 = f_security(syminfo.tickerid, i_timeframe1, out[1], i_repaint)
trend2 = f_security(syminfo.tickerid, i_timeframe2, out, i_repaint)
prevTrend2 = f_security(syminfo.tickerid, i_timeframe2, out[1], i_repaint)
trend3 = f_security(syminfo.tickerid, i_timeframe3, out, i_repaint)
prevTrend3 = f_security(syminfo.tickerid, i_timeframe3, out[1], i_repaint)
//} MTF
// { Table
var overview = table.new(position=f_getPosition(i_pos), columns=4, rows=6, bgcolor=color.new(color.black, 100), border_width=1)
if barstate.islast
// Labels
table.cell(overview, 1, 0, i_timeframe1, text_color=color.new(i_col, 0))
table.cell(overview, 2, 0, i_timeframe2, text_color=color.new(i_col, 0))
table.cell(overview, 3, 0, i_timeframe3, text_color=color.new(i_col, 0))
// Momentum
table.cell(overview, 0, 2, 'Momentum', text_color=color.new(i_col, 0))
table.cell(overview, 1, 2, str.format('{0,number,#.##}', rsi1), text_color=rsi1 > prevRsi1 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 2, 2, str.format('{0,number,#.##}', rsi2), text_color=rsi2 > prevRsi2 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 3, 2, str.format('{0,number,#.##}', rsi3), text_color=rsi3 > prevRsi3 ? color.new(color.lime, 0) : color.new(color.red, 0))
// Volatility
table.cell(overview, 0, 3, 'Volatility', text_color=color.new(i_col, 0))
table.cell(overview, 1, 3, str.format('{0,number,#.##}', atr1) + '%', text_color=atr1 > prevAtr1 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 2, 3, str.format('{0,number,#.##}', atr2) + '%', text_color=atr2 > prevAtr2 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 3, 3, str.format('{0,number,#.##}', atr3) + '%', text_color=atr3 > prevAtr3 ? color.new(color.lime, 0) : color.new(color.red, 0))
// Trend
table.cell(overview, 0, 4, 'Trend', text_color=color.new(i_col, 0))
table.cell(overview, 1, 4, trend1 > prevTrend1 ? 'AL' : 'SAT', text_color=trend1 > prevTrend1 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 2, 4, trend2 > prevTrend2 ? 'AL' : 'SAT', text_color=trend2 > prevTrend2 ? color.new(color.lime, 0) : color.new(color.red, 0))
table.cell(overview, 3, 4, trend3 > prevTrend3 ? 'AL' : 'SAT', text_color=trend3 > prevTrend3 ? color.new(color.lime, 0) : color.new(color.red, 0))
//} Table
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © chervolino
// Dynamic Reactor [CHE] indicator displays dynamic support and resistance levels.
// Green lines represent resistance, red lines represent support, and gray lines represent areas of consolidation.
// The length of the indicator can be adjusted with the lengthMA input.
//@version=5
indicator("Dynamic Reactor [CHE]", shorttitle="DR [CHE]", overlay=true)
//Inputs
lengthMA = input(5, 'Length DR', inline='Inp', group='Input')
color green = input(#00e677f6, inline='Col', group='Color')
color red = input(#ff5252, inline='Col', group='Color')
color gray =input(#787b8600, inline='Col', group='Color')
// Function
dyn_rea(src, len) =>
var smma = 0.0
h = ta.sma(src, len)
smma := na(smma[1]) ? h : (smma[1] * (len - 1) + src) / len
smma
// Calculation
hi=dyn_rea(high, lengthMA)
lo=dyn_rea(low, lengthMA)
mi=(hi-lo)/2+lo
// Plots
a=plot(hi,"", hlc3>hi?green:hlc3<lo?red:gray)
b=plot(lo,"", hlc3>hi?green:hlc3<lo?red:gray)
c=plot(mi,"", hlc3>hi?green:hlc3<lo?red:gray)
fill(a,b,hlc3>hi?color.new(green,60):hlc3<lo?color.new(red,60):color.gray)
PHP Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AussieBogan
//@version=5
indicator('Dynamic Take Profit & Signal Provider', shorttitle='DTSP', overlay=true, max_bars_back=4000)
//**************************************************************************************//
//******************************Moving Average Strategy********************************//
timer = input(title='ATR Period', defval=14)
source = input(hl2, 'Source')
MTP = input.float(title='ATR Multiplier', step=0.1, defval=7.0)
sf = input.float(0.8, 'Sensitivity [0,1]', minval=0, maxval=1)
changeATR = input(title='Changing ATR method?', defval=false)
showsignals = input(title='Reveal Long/Short Signals ?', defval=true)
avg = 0.
srca = sf * source + (1 - sf) * nz(avg[1], source)
atrsecond = ta.sma(ta.tr, timer)
atr = changeATR ? ta.atr(timer) : atrsecond
upa = srca - MTP * atr
up1a = nz(upa[1], upa)
upa := close[1] > up1a ? math.max(upa, up1a) : upa
dna = srca + MTP * atr
dn1a = nz(dna[1], dna)
dna := close[1] < dn1a ? math.min(dna, dn1a) : dna
avg := math.avg(upa, dna)
trenda = 1
trenda := nz(trenda[1], trenda)
trenda := trenda == -1 and close > dn1a ? 1 : trenda == 1 and close < up1a ? -1 : trenda
LongSignal = trenda == 1 and trenda[1] == -1
ShortSignal = trenda == -1 and trenda[1] == 1
//***********************************************************************************************************************//
//*****************************************ATR STOP and Swing HIgh and Swing Low TP********************************************************************//
//Mode
src = input(title='Source', defval=close)
atrLen = input.int(title='ATR', defval=21, minval=1, maxval=100)
m1 = input.float(title='ATR Multiplier - ADX Rising', defval=3, minval=1, step=0.1, maxval=100)
m2 = input.float(title='ATR Multiplier - ADX Falling', defval=3, minval=1, step=0.1, maxval=100)
adxLen = input.int(title='ADX', defval=14, minval=1, maxval=100)
// DI-Pos, DI-Neg, ADX
hR = high - nz(high[1])
lR = nz(low[1]) - low
dmPos = hR > lR ? math.abs(hR) : 0
dmNeg = lR > hR ? math.abs(lR) : 0
var float sTR = na
sTR := nz(sTR[1]) - nz(sTR[1]) / adxLen + ta.tr
var float sDMPos = na
sDMPos := nz(sDMPos[1]) - nz(sDMPos[1]) / adxLen + dmPos
var float sDMNeg = na
sDMNeg := nz(sDMNeg[1]) - nz(sDMNeg[1]) / adxLen + dmNeg
DIP = sDMPos / sTR * 100
DIN = sDMNeg / sTR * 100
DX = math.abs(DIP - DIN) / (DIP + DIN) * 100
adx = ta.sma(DX, adxLen)
// Trailing ATR
var float m = na
m := ta.rising(adx, 1) ? m1 : ta.falling(adx, 1) ? m2 : nz(m[1])
up = hl2 - m * ta.atr(atrLen)
dn = hl2 + m * ta.atr(atrLen)
var float TUp = na
TUp := src[1] > TUp[1] ? math.max(up, TUp[1]) : up
var float TDown = na
TDown := src[1] < TDown[1] ? math.min(dn, TDown[1]) : dn
var float trend = na
trend := src > TDown[1] ? 1 : src < TUp[1] ? -1 : nz(trend[1], 1)
stop = trend == 1 ? TUp : TDown
trendChange = ta.change(trend)
// Plot
lineColor = not trendChange ? trend > 0 ? #00FF00DD : #FF0000DD : #00000000
shapeColor = trendChange ? trendChange > 0 ? #00FF00F8 : #FF0000F8 : #00000000
plot(stop, color=lineColor, style=plot.style_line, linewidth=1, title='ATR Trend')
barsback = input(90, title='Bars back to check for a swing')
swing_detection(index) =>
var float swing_high = na
var float swing_low = na
start = index * 2 - 1 // -1 so we have an even number of
swing_point_high = high[index]
swing_point_low = low[index]
//Swing Highs
for i = 0 to start by 1
// swing_high := true
if i < index
if high[i] > swing_point_high
swing_high := high[i]
break
// Have to do checks before pivot and after seperately because we can get
// two highs of the same value in a row. Notice the > and >= difference
if i > index
if high[i] >= swing_point_high
swing_high := high[i]
break
//Swing lows
for i = 0 to start by 1
// swing_low := true
if i < index
if low[i] < swing_point_low
swing_low := low[i]
break
// Have to do checks before pivot and after seperately because we can get
// two lows of the same value in a row. Notice the > and >= difference
if i > index
if low[i] <= swing_point_low
swing_low := low[i]
break
[swing_high, swing_low]
// Check for a swing
[sw_h, sw_l] = swing_detection(barsback)
new_bar(res) =>
ta.change(time(res)) != 0
adr(length) =>
range_1 = high - low
ta.sma(range_1[1], length)
adr_high(adr) =>
high - low < adr ? low + adr : close >= open ? low + adr : high
adr_low(adr) =>
high - low < adr ? high - adr : close >= open ? low : high - adr
plotshape(LongSignal and showsignals ? up : na, title='BUY', style=shape.arrowup, location=location.belowbar, size=size.auto, text='Buy', color=color.new(color.green, 0))
plotshape(ShortSignal and showsignals ? dn : na, title='SELL', style=shape.arrowdown, location=location.abovebar, size=size.auto, text='Sell', color=color.new(color.red, 0))
os = 0.
tp = 0.
os := LongSignal ? 1 : ShortSignal ? 0 : os[1]
tp := ta.change(os) == 1 ? sw_h : ta.change(os) == -1 ? sw_l : tp[1]
css = os == 1 ? #0cb51a : #2157f3
plot(tp, color=ta.change(os) ? na : fixnan(css))
tpl = input(50, 'Tp Length')
tpm = input(2., 'Tp Multiplicative Factor')
valong = ta.valuewhen(LongSignal, close, 0)
valshort = ta.valuewhen(ShortSignal, close, 0)
dev = ta.stdev(close, tpl) * tpm
up2 = valong + dev * 2
up1 = valong + dev
dn1 = valong - dev
dn2 = valong - dev * 2
plotshape(os == 1 ? up1 : dn1, title='TP 1', style=shape.circle, location=location.absolute, size=size.auto, text='TP 1', textcolor=css, color=fixnan(css), show_last=1, offset=14, transp=0)
plotshape(os == 1 ? up2 : dn2, title='TP 2', style=shape.circle, location=location.absolute, size=size.auto, text='TP 2', textcolor=css, color=fixnan(css), show_last=1, offset=14, transp=0)
plotshape(os == 0 ? na : valong, title='Long', style=shape.circle, location=location.absolute, size=size.auto, text='Long Position', textcolor=color.new(#0cb51a, 0), color=color.new(#0cb51a, 0), show_last=1, offset=14)
plotshape(os == 1 ? na : valshort, title='Short', style=shape.circle, location=location.absolute, size=size.auto, text='Short Position', textcolor=color.new(#ff1100, 0), color=color.new(#ff1100, 0), show_last=1, offset=14)
Dünkü işlemden ne aldık. DENIZ FINANS BANKOF sagcep sol cep aradan geleni kaynat evine gönder.Dedim dün düzeltme bitti psikolojiye oynuyorlar eninde sonunda gideceksin dostum.
.
borsanın böyle düştüğü bir günde düşmesi normal ama ben hala 2 şeyi anlamıyorum dün BOFA +160k alımdayken 570 ortalama ile -40k satım ile kapattı günü tavana oturtmaya çalıştı ama olmayınca sattı sanırım. bir diğer şey ise bu hissede benim gördüğüm tacirler, qnb, deniz ve oyak yatırım üzerinden (benim düşüncem bunların hepsi aynı ekip) bir şeyler çeviriyorlar ve hisse fiyatını onlar belirliyor. Bugün deniz yatırım 50k lot 619 ile almış görünüyor ama yarın bence bunların hepsini daha ucuzdan satacak gibi. tabi bunlar tahmin sonuçta bilemem
Şirketin somut bir şeyler açıklaması lazım, örneğin yüksek meblağlı yeni bir iş, yatırım vs. İştiraklerde sermaye arttırdılar ama bunların iş anlamında dönüşünü görmek lazım. Yeni bilançoyu da görmek lazım, bakalım karlılık şu anki seviyede devam edecek mi. Portföyümün çoğu burada, dolayısıyla bugünkü düşüş oldukça can sıkıcı oldu ancak binho bunu telafi edebilecek güçte diye düşünüyorum
çok kontrollü...bu aralar....
İyice sıkıştı,,patlama noktasında:)
https://www.tradingview.com/x/Kj1WdiWG/
https://www.tradingview.com/x/NWHzkfxU/
https://www.tradingview.com/x/IqI4yb6u/
seanslık 624 direni geçilirse.....
https://www.tradingview.com/x/nEcwSmkH/ günlükte sistemim al verir...ki..
sıralı dirençler...648....
687 teyit....695 mom direnci...
nasip....
https://www.tradingview.com/x/KjAUeZ5c/ 10 aralık grafik...
kapanış 611 üzeri olacak mı...bakalım...
580 altına gelmedi şimdilik, iki kere 588 ve 589dan döndü, buranın altına pek inmek istemiyor gibi. Hacim azaldı, hareket alanı azaldı, böyle durumlarda genelde kırılım gelir, ya yukarı ya aşağı kıracağını düşünüyorum, yeterince yatay gittik ve konsolide olduk gibi.
Umarım yukarı atarız.