merhaba
tradingview de CryptoJJ - SSL indicator ü matrikste nasıl yazarız.
iyi çalışmalar diliyorum.
sitedeki formul bu şekilde
length=input(title="SSL length", defval=14) // Period for the moving avarages used, if you trade 1H/2H/4H timeframes, you might want to use lower setting.
smaHigh=ema(high, length) // Dafault moving avarage is sma, you can use ema for more agressive trading.
smaLow=ema(low, length)
Hlv = close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? smaHigh: smaLow
sslUp = Hlv < 0 ? smaLow : smaHigh
plot(sslDown, color = fuchsia, linewidth = 2)
plot(sslUp, color = aqua, linewidth = 2) // Second line of SSL, I personally find it useless, having only one line keeps the chart easier to read.
color_bar = (close > sslDown)? ( open > close? #016e65 : #00ffea) : (close > open? #e100ff : #6c007a)
barcolor(color_bar)
/////////////////////////////////////////////////////////////////////////// ARROW ////////////////////////////////////////////////////////////////////////////
plotshape(crossover(sslUp,sslDown),style = shape.labelup, location = location.belowbar, color = lime, size= size.small, title="Buy arrow")
plotshape(crossunder(sslUp,sslDown),style = shape.labeldown, location = location.abovebar, color = red, size= size.small, title="Sell arrow")