Skip to content

Commit

Permalink
修改MA数据计算
Browse files Browse the repository at this point in the history
  • Loading branch information
zcZhang123 committed Mar 29, 2019
1 parent 12be136 commit e0f451b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jcc_kline",
"version": "0.1.25",
"version": "0.1.26",
"description": "jccdex kline",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/processData.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const calculateMA = (dayCount, data) => {
continue;
}
var sum = 0;
for (var j = 0; j < dayCount - 1; j++) {
for (var j = 0; j < dayCount; j++) {
let item = parseFloat(data.values[i - j][1]);
if (isNaN(item)) {
sum += 0;
Expand Down

0 comments on commit e0f451b

Please sign in to comment.