A question about the rsi() function

Hello,

I'm trying to convert this function from pinescript to javascript

mf(src) => rsi(sum(volume * (change(src) <= 0 ? 0 : src), n3), sum(volume * (change(src) >= 0 ? 0 : src), n3))

the only issue is that, by looking at the documentation, the rsi(x, y) function can also take series as the x and y arguments (which is the case in the above function), but there is no information on how the result is calculated from those series.

This is the only thing that they say

If x is a series and y is a series then x and y are considered to be 2 calculated MAs for upward and downward changes.

https://www.tradingview.com/pine-script-reference/#fun_rsi

Can someone please help me understand or point me to a resource on how is this calculated?

Submitted September 29, 2020 at 10:12AM by alexcambose
via https://ift.tt/3cIOhkr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s