TradingView
ceyhun
23 sept. 2018 12:49

Super Trend 

Bitcoin / United States DollarCoinbase

Description

Super Trend

Notes de version

v4 update
Commentaires
pratikgundaraniya
Hi
Where i enter the trade ?
Buy after green background ?
I don't understand
ceyhun
@pratikgundaraniya, Stoch
aboveLine = k > upLine
belowLine = k < lowLine
crossUp = (k[1] < d[1] and k[1] < lowLine[1]) and (k > d)
crossDn = (k[1] > d[1] and k[1] > upLine[1]) and (k < d)
crossUpAll = (k[1] < d[1] and k > d)
crossDownAll = (k[1] > d[1] and k < d)

bgcolor(sbh and aboveLine ? #00FFFF : na, transp=70)
bgcolor(sbh and belowLine ? black : na, transp=70)
bgcolor(sch and crossUp ? lime : na, transp=40)
bgcolor(sch and crossDn ? red : na, transp=40)
bgcolor(sac and crossUpAll ? lime : na, transp=40)
bgcolor(sac and crossDownAll ? red : na, transp=40)

Stoch-RSI
aboveLine7 = outRSI > upLine7
belowLine7 = outRSI < lowLine7
crossUp7 = outRSI[1] < lowLine7 and outRSI > lowLine7
crossDn7 = outRSI[1] > upLine7 and outRSI < upLine7

bgcolor(sbh7 and aboveLine7 ? red : na, transp=70)
bgcolor(sbh7 and belowLine7 ? green : na, transp=70)
bgcolor(sch7 and crossUp7 ? lime : na, transp=40)
bgcolor(sch7 and crossDn7 ? red : na, transp=40)
capablePlayer
@pratikgundaraniya, Did you get the reply for the this, could you please pass me the answer please.. confused when to take the entry and exit
invest_shares
I am not seeing the buy and sell character getting plotted over bars. If you can explain that would be helpful.
ceyhun
study(title="Super Trend", shorttitle="EST", overlay=true)

fastLength = input(8, minval=1)
slowLength = input(16,minval=1)
signalLength=input(11,minval=1)

fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)
pos = iff(signal < macd , 1,
iff(signal > macd, -1, nz(pos[1], 0)))
barcolor(pos == -1 ? red: pos == 1 ? green : blue)



lenadx = input(14, minval=1, title="DI Length")
lensig = input(14, title="ADX Smoothing", minval=1, maxval=50)
limadx = input(18, minval=1, title="ADX MA Active")

up = change(high)
down = -change(low)
trur = rma(tr, lenadx)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, lenadx) / trur)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, lenadx) / trur)
sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)

macol = adx > limadx and plus > minus ? lime : adx > limadx and plus < minus ? red :black

len = input(233, minval=1, title="Length")
src = input(close, title="Source")
out = sma(src, len)
plot(out, color=macol, title="233&DMİ", linewidth= 4)



len1 = input(14, minval=1, title="Length for Stochastic")
smoothK = input(3, minval=1, title="SmoothK for Stochastic")
smoothD = input(3, minval=1, title="SmoothD for Stochastic")
upLine = input(80, minval=50, maxval=90, title="Upper Line Value?")
lowLine = input(20, minval=10, maxval=50, title="Lower Line Value?")

sbc = input(false, title="Show Price Bar highlight When Stoch is Above/Below High/Low Lines?")
sbh = input(true, title="Show Background highlight When Stoch is Above/Below High/Low Lines?")
sch = input(false, title="Show Back Ground Highlights When Stoch Cross - Strict Criteria - K Greater/LesThan High/Low Line - Crosses D ?")
sl = input(false, title="Show 'B' and 'S' Letters When Stoch Crosses High/Low Line & D?")
sac = input(false, title="Show Back Ground Highlights When Stoch Cross - Any Cross?")
sacl = input(false, title="Show 'B' and 'S' Letters When Stoch Crosses - Any Cross?")

k = sma(stoch(close, high, low, len1), smoothK)
d = sma(k, smoothD)

aboveLine = k > upLine ? 1 : 0
belowLine = k < lowLine ? 1 : 0

crossUp = (k[1] < d[1] and k[1] < lowLine[1]) and (k > d) ? 1 : 0
crossDn = (k[1] > d[1] and k[1] > upLine[1]) and (k < d) ? 1 : 0

crossUpAll = (k[1] < d[1] and k > d) ? 1 : 0
crossDownAll = (k[1] > d[1] and k < d) ? 1 : 0

bgcolor(sbh and aboveLine ? #00FFFF : na, transp=70)
bgcolor(sbh and belowLine ? black : na, transp=70)
bgcolor(sch and crossUp ? lime : na, transp=40)
bgcolor(sch and crossDn ? red : na, transp=40)

bgcolor(sac and crossUpAll ? lime : na, transp=40)
bgcolor(sac and crossDownAll ? red : na, transp=40)

overBought() => sbc and aboveLine
overSold() => sbc and belowLine

barcolor(overBought() ? orange : overSold() ? fuchsia : na)

plotchar(sl and crossUp ? crossUp : na, title="Buy Signal Strict Criteria", char='B', location=location.belowbar, color=lime, transp=0, offset=0)
plotchar(sl and crossDn ? crossDn : na,
viks_0505
@ceyhun, Hi , Could you please publish the performance report for this strategy for nifty or banknifty on a small timeframe of 30 minutes
narayanp188
hey brother ur tool was perfect but u can improve & add in up & down signal so this tool was perfect
ceyhun
plotchar(sl and crossDn ? crossDn : na, title="Sell Signal Strict Criteria", char='S', location=location.abovebar, color=red, transp=0, offset=0)
plotchar(sacl and crossUpAll ? crossUpAll : na, title="Buy Signal Any Cross Up", char='B', location=location.belowbar, color=lime, transp=0, offset=0)
plotchar(sacl and crossDownAll ? crossDownAll : na, title="Sell Signal Any Cross Down", char='S', location=location.abovebar, color=red, transp=0, offset=0)

short = sma(close, 987 )
plot(short, color = black ,title='987', linewidth = 4 )

ATRlength = input(200, minval=1)
ATRMult = input(2.272, minval=1)

ATR = rma(tr(true), ATRlength)

len2 = input(26, minval=1, title="EMA Length")
src2 = input(close, title="Source")
out2 = ema(src, len)

conversionPeriods = input(5, minval=1),
basePeriods = input(26, minval=1)
laggingSpan2Periods = input(52, minval=1),
displacement = input(26, minval=1)

donchian(len) => avg(lowest(len), highest(len))

conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)

kjuncol = conversionLine > baseLine ? blue : conversionLine < baseLine ? red : orange

plot(baseLine, color=kjuncol,linewidth=2,transp=5, title="Base Line", linewidth = 4)

precision=0
src7 = close
len7 = input(14, minval=1, title="Length")
upLine7 = input(70, minval=50, maxval=90, title="Upper Line Value?")
lowLine7 = input(30, minval=10, maxval=50, title="Lower Line Value?")

sml7 = input(false, title="Show Mid Line?")
sbh7 = input(true, title="Show Back Ground Highlights When RSI is Above/Below High/Low Lines?")
sch7 = input(true, title="Show Back Ground Highlights When RSI Cross?")
sl7 = input(false, title="Show 'B' and 'S' Letters When RSI Crosses High/Low Line?")
useCurrentRes = input(true, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=resolution, defval="60")
ssRSI = input(false, title="Show 2nd RSI?")
resCustom2 = input(title="Use 2nd RSI? Check Box Above", type=resolution, defval="D")
useCurrentRes2 = input(false, title="Use 2nd RSI Plot On Samet Timeframe?")
len8 = input(14, minval=1, title="2nd RSI Length")

res = useCurrentRes ? period : resCustom
res2 = useCurrentRes2 ? period : resCustom2

up7 = rma(max(change(src), 0), len7)
down7 = rma(-min(change(src), 0), len8)
rsi7 = down7 == 0 ? 100 : up7 == 0 ? 0 : 100 - (100 / (1 + up7 / down7))
outRSI = security(tickerid, res, rsi7)

up2 = rma(max(change(src), 0), len8)
down2 = rma(-min(change(src), 0), len8)
rsi2 = down2 == 0 ? 100 : up2 == 0 ? 0 : 100 - (100 / (1 + up2 / down2))
outRSI2 = security(tickerid, res2, rsi2)

aboveLine7 = outRSI > upLine7 ? 1 : 0
belowLine7 = outRSI < lowLine7 ? 1 : 0
crossUp7 = outRSI[1] < lowLine7 and outRSI > lowLine7 ? 1 : 0
crossDn7 = outRSI[1] > upLine7 and outRSI < upLine7 ? 1 : 0

bgcolor(sbh7 and aboveLine7 ? red : na, transp=70)
bgcolor(sbh7 and belowLine7 ? green : na, transp=70)
bgcolor(sch7 and crossUp7 ? lime : na, transp=40)
jsnr9677
I think this indicator working well but some how that background colours and different colours of candles are bit confusing if possible please clarify that
Thank you
raja74sekhar
Wonderful indicator. What is supertrend values for this indicator. Kindly let me know. So that I can filter stocks based on your supertrend values. Thank you in advance
Plus