QuantitativeExhaustion

[RS][JR]RSI Momentum V1

RSI Momentum
By Ricardo Santos and JR

This system is a clash of two indicators, Momentum and RSI. Strength of signals are viewed by both height and color. Dark Green or Light Red bars signal strong momentum. Light Red bar signals and Green bar signals reach an apex at the top of the indicator pane.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
study(title="[RS][JR]RSI Momentum V1", shorttitle="[RS][JR]RSIM.V1", overlay=false)
//  ||---   Inputs:
base_length = input(1)
scalar_length = input(1)
src = input(hlc3, type=source)

//  ||--------------------------------------------
//  ||---   Functions:
maF(src, base, scalar, multiplier) => ema(src, base_length + scalar_length * multiplier)
isSlope(ma) => ma > ma[1]
isSlopeMom(ma) => (ma[1] - ma[2]) < (ma - ma[1])
colorF(slope, mom) => slope and mom ? green : slope and (not mom) ? #66b266 : 
        not slope and mom ? maroon : (not slope) and (not mom) ? #b26666 : na
hasChangedColor(slope, mom) => slope and mom ? green : slope and (not mom) ? #66b266 : 
        not slope and mom ? maroon : (not slope) and (not mom) ? #b26666 : na
//  Usage : hasChangeColor(maF(src, base_length, scalar_length, 0)),isSlopeMom(maF(src, base_length, scalar_length, 0))
//  ||--------------------------------------------

plot(00, color=colorF(isSlope(maF(src, base_length, 0, 0)),isSlopeMom(maF(src, base_length, 0, 0))), style=columns, histbase=01, transp=0)
plot(01, color=colorF(isSlope(maF(src, base_length, scalar_length, 2)),isSlopeMom(maF(src, base_length, scalar_length, 2))), style=columns, histbase=02, transp=0)
plot(02, color=colorF(isSlope(maF(src, base_length, scalar_length, 4)),isSlopeMom(maF(src, base_length, scalar_length, 4))), style=columns, histbase=03, transp=0)
plot(03, color=colorF(isSlope(maF(src, base_length, scalar_length, 6)),isSlopeMom(maF(src, base_length, scalar_length, 6))), style=columns, histbase=04, transp=0)
plot(04, color=colorF(isSlope(maF(src, base_length, scalar_length, 8)),isSlopeMom(maF(src, base_length, scalar_length, 8))), style=columns, histbase=05, transp=0)
plot(05, color=colorF(isSlope(maF(src, base_length, scalar_length, 10)),isSlopeMom(maF(src, base_length, scalar_length, 10))), style=columns, histbase=06, transp=0)
plot(06, color=colorF(isSlope(maF(src, base_length, scalar_length, 12)),isSlopeMom(maF(src, base_length, scalar_length, 12))), style=columns, histbase=07, transp=0)
plot(07, color=colorF(isSlope(maF(src, base_length, scalar_length, 14)),isSlopeMom(maF(src, base_length, scalar_length, 14))), style=columns, histbase=08, transp=0)
plot(08, color=colorF(isSlope(maF(src, base_length, scalar_length, 16)),isSlopeMom(maF(src, base_length, scalar_length, 16))), style=columns, histbase=09, transp=0)
plot(09, color=colorF(isSlope(maF(src, base_length, scalar_length, 18)),isSlopeMom(maF(src, base_length, scalar_length, 18))), style=columns, histbase=10, transp=0)
plot(10, color=colorF(isSlope(maF(src, base_length, scalar_length, 20)),isSlopeMom(maF(src, base_length, scalar_length, 20))), style=columns, histbase=11, transp=0)
plot(11, color=colorF(isSlope(maF(src, base_length, scalar_length, 22)),isSlopeMom(maF(src, base_length, scalar_length, 22))), style=columns, histbase=12, transp=0)
plot(12, color=colorF(isSlope(maF(src, base_length, scalar_length, 24)),isSlopeMom(maF(src, base_length, scalar_length, 24))), style=columns, histbase=13, transp=0)
plot(13, color=colorF(isSlope(maF(src, base_length, scalar_length, 26)),isSlopeMom(maF(src, base_length, scalar_length, 26))), style=columns, histbase=14, transp=0)
plot(14, color=colorF(isSlope(maF(src, base_length, scalar_length, 28)),isSlopeMom(maF(src, base_length, scalar_length, 28))), style=columns, histbase=15, transp=0)
plot(15, color=colorF(isSlope(maF(src, base_length, scalar_length, 30)),isSlopeMom(maF(src, base_length, scalar_length, 30))), style=columns, histbase=16, transp=0)
plot(16, color=colorF(isSlope(maF(src, base_length, scalar_length, 32)),isSlopeMom(maF(src, base_length, scalar_length, 32))), style=columns, histbase=17, transp=0)
plot(17, color=colorF(isSlope(maF(src, base_length, scalar_length, 34)),isSlopeMom(maF(src, base_length, scalar_length, 34))), style=columns, histbase=18, transp=0)
plot(18, color=colorF(isSlope(maF(src, base_length, scalar_length, 36)),isSlopeMom(maF(src, base_length, scalar_length, 36))), style=columns, histbase=19, transp=0)
plot(19, color=colorF(isSlope(maF(src, base_length, scalar_length, 38)),isSlopeMom(maF(src, base_length, scalar_length, 38))), style=columns, histbase=20, transp=0)