The resource loading... loading...

I wrote the RSI formula myself, there's a mistake here, please guide me.

Author: pu330619672, Created: 2020-04-13 23:35:26, Updated:

function RSI ((records, N) { //LC:=REF ((CLOSE, 1) is the // RSI1:SMA ((MAX)) close-LC,0), N1,1) /SMA (ABS) close-LC, N1,1) * 100 var v1 is equal to [] var v2 is equal to [] var MAX is equal to [] var ABS is equal to [] for (var i = N; i < records.length; i++) { //LC = records[i - 1].Close var ba = records.slice ((i - N, i + 1) v1[i] is equal to ba for (var k = N + 1; k < v1.length; k++) { for (var j = N; j > 0; j) { var c = v1 [k][j].Close - v1 [k][j -1].Close So this is going to be equal to v2 [j] = c. for (var b = 1; b < v2.length; b++) { var c = MAX ((v2[b]) var c1 = ABS ((v2[b]) //var b = SMA ((MAX,N,1)) is equal to //var b1 = SMA ((ABS,N,1)) is the I'm not sure. I'm not sure. I'm not sure. I'm not sure. return [c, c1] I'm not sure. The code isn't finished, but it's not bad, and it shows the value of 17 lines of v2 not getting, but I got it from my testing tool, so I don't know where the problem is, so please send it out and show me.


More

The grassRSI can see the code, FMZ is also open.

The grass https://www.fmz.com/bbs-topic/409

pu330619672It's open, I looked it up, can you give me a link?