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
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
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)