Handwritten TV version of KDJ indicator, which is completely incompatible with TV and FMZ

Author: The Old Man, Created: 2021-09-11 22:27:33, Updated:

KDJ is a commonly used indicator, I don't know why TV and FMZ are completely incompatible, maybe the two ideas are the same, but the specific algorithms are different, for convenience, I wrote this indicator by hand in the introduction to the TV, and then the contrast is perfectly compatible, if there are friends who need to copy the past, there is a need for custom development strategies, please contact me.laohuo1379

function KDJ(rds, n, smoothK, smoothD) { var rsi = []; for(var i in rds){ var rd = rds[i]; var lowest = rd.Low; var highest = rd.High; for(var j=i; j>i-n && j>=0; j–){ if(rds[j].Low < lowest) lowest = rds[j].Low; if(rds[j].High > highest) highest = rds[j].High; } rsi[i] = 100*(rd.Close-lowest)/(highest-lowest); } var k = TA.MA(rsi, smoothK); var d = TA.MA(k, smoothD); return [k,d]; }


More

Light cloudsIs it too late for a K-line?

The grassThank you for sharing.