RicardoSantos

[RS]RSI Momentum Bands V0

EXPERIMENTAL: RSI Momentum Weighted Bands(cloud)
オープンソーススクリプト

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

免責事項

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

チャートでこのスクリプトを利用したいですか?
//  ||--------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
study(title="[RS]RSI Momentum Bands V0", shorttitle="[RS]RSI.MB.V0", overlay=true)
//  ||--------------------------------------------------------------------------------------||
//  ||---   Inputs:     --------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
src = input(close)
length = input(14)
smooth = input(10)
//  ||--------------------------------------------------------------------------------------||
//  ||---   RSI Momentum Bands Function:    ------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
rsi_mom_bands(_src, _length, _smooth)=>
    _rsi = rsi(_src, _length)
    _dif = sma(change(_src, _length), _smooth)
    _selline = ema(_src[_length] + (_dif*(_rsi*0.01)), _smooth)
    _buyline = _selline + (_dif*(_rsi*0.01))
    [_selline, _buyline]
//  ||--------------------------------------------------------------------------------------||
//  ||---   RSI Momentum Bands Cast:  ------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
[sline, bline] = rsi_mom_bands(src, length, smooth)
//  ||--------------------------------------------------------------------------------------||
//  ||---   Output:     --------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
tb = plot(sline, color=maroon)
bb = plot(bline, color=green)
fill(tb, bb, color=blue, transp=85)
//  ||--------------------------------------------------------------------------------------||
//  ||---   Bar Color:     -----------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
showBarColor = input(true)
Direction = bline > sline
isSqueeze = abs(sline-bline) < abs(sline[1]-bline[1])
BC_condition = Direction and not isSqueeze and src > sline ? lime :
        Direction and src > sline ? green :
        not Direction and not isSqueeze and src < bline ? red :
        not Direction and src < bline ? maroon : gray
barcolor(not showBarColor ? na : BC_condition)
//  ||--------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||
//  ||--------------------------------------------------------------------------------------||