0
Follow
5
Followers
Phiên bản TV viết tay của chỉ báo KDJ, chỉ báo TV và FMZ này hoàn toàn không nhất quán
Created 2021-09-11 22:27:33
2
1258
KDJ chỉ số thường được sử dụng, không biết tại sao TV và FMZ hoàn toàn không phù hợp, có lẽ 2 người cùng suy nghĩ, nhưng thuật toán cụ thể khác nhau, vì tiện lợi, tôi theo giới thiệu trong TV, viết tay chỉ số này, sau đó so sánh, hoàn toàn phù hợp, nếu có bạn bè có thể sao chép quá khứ, có nhu cầu phát triển tùy chỉnh chiến lược, xin vui lòng liên hệ với tôi.
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];
}
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?

