Skip to content

Commit

Permalink
修改KDJ指标计算问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zcZhang123 committed Apr 24, 2019
1 parent 58c4bde commit 73685f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/CalculateIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const getKDJData = (dayCount, data) => {
});
let highestPrice = bigToSmallHighestPriceData[0];
let RSVData = (data[i][1] - lowestPrice) / (highestPrice - lowestPrice) * 100;
if (isNaN(RSVData)) {
RSVData = 0;
}
RSV.push(RSVData);
let KBeforeData;
if (!isNaN(KData[i - 1])) {
Expand Down

0 comments on commit 73685f1

Please sign in to comment.