yongyuth.rootwararit

yuthavithi's BB Scalper

A trend based BB scalper. It uses day time frame data to determine trend. When price moves above sma, it is up trend , otherwise it is down trend. the trading signal is determined in lower time frame using bband. In up trend, it will only buy and close when price reaches bb upper band. In downtrend it will do the opposite
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
study(title="yuthavithi's BB Scalper", shorttitle="YUTHAVITHI BB Scalper", overlay=true)
len = input(20, minval=1, title="Length")
multiplier = input(2, minval=1, title="multiplier")
src = input(close, title="Source")
out = sma(src, len)
plot(out, title="SMA", color=blue)

stdOut = stdev(close, len)
bbUpper = out + stdOut * multiplier
bbLower = out - stdOut * multiplier
plot(bbUpper, color = orange)
plot(bbLower, color = orange)

closeLongTerm = security(tickerid, "D", close)
smaLongTerm = security(tickerid, "D", sma(close,20))


plot(smaLongTerm, color=red)

trendUp = (closeLongTerm > smaLongTerm) 
trendDown = (closeLongTerm < smaLongTerm) 

bearish = (cross(close,out) == 1) and (close[1] > close) and trendDown
bullish = (cross(close,out) == 1) and (close[1] < close) and trendUp

plotshape(bearish, color=red, style=shape.arrowdown, text="Sell", location=location.abovebar)
plotshape(bullish, color=green, style=shape.arrowup, text="Buy", location=location.belowbar)

closeBuy = (high[1] > bbUpper) and (close < bbUpper) and (close < open)
closeSell = (low[1] < bbLower) and (close > bbLower) and (close > open)

plotshape(closeSell, color=red, style=shape.arrowup, text="Close", location=location.belowbar)
plotshape(closeBuy, color=green, style=shape.arrowdown, text="Close", location=location.abovebar)