Commit 55fb94e7 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 31b5cae5
...@@ -154,6 +154,12 @@ async function run() ...@@ -154,6 +154,12 @@ async function run()
// balance = balance + dates[i].profit // balance = balance + dates[i].profit
// dates[i].balance = balance // dates[i].balance = balance
// } // }
balance=lastBalance
for (let i=0;i<dates.length;i++)
{
balance=balance+dates[i].profit
dates[i].balance=balance
}
arrDate = _.orderBy(arrDate, ['sum']) arrDate = _.orderBy(arrDate, ['sum'])
console.log(dates) console.log(dates)
console.log('Balance ->',balance-lastBalance) console.log('Balance ->',balance-lastBalance)
......
...@@ -71,7 +71,7 @@ function resetDates() { ...@@ -71,7 +71,7 @@ function resetDates() {
for (let i = 0; i < year.length; i++) { for (let i = 0; i < year.length; i++) {
for (let j = 0; j < month.length; j++) { for (let j = 0; j < month.length; j++) {
let t = year[i] + '-' + month[j] let t = year[i] + '-' + month[j]
if (!(t === '2017-01' || t === '2017-02' || t === '2017-03' || t === '2017-04' || t === '2017-05' || t === '2017-06' || t === '2017-07' || t === '2022-05' || t === '2022-06' || t === '2022-07' || t === '2022-08' || t === '2022-09' || t === '2022-10' || t === '2022-11' || t === '2022-12')) if (!(t === '2017-01' || t === '2017-02' || t === '2017-03' || t === '2017-04' || t === '2017-05' || t === '2017-06' || t === '2017-07' || t === '2017-08' || t === '2022-05' || t === '2022-06' || t === '2022-07' || t === '2022-08' || t === '2022-09' || t === '2022-10' || t === '2022-11' || t === '2022-12'))
dates.push({date: t, profit: 0, count: 0, longCount: 0, shortCount: 0, longProfit: 0, shortProfit: 0}) dates.push({date: t, profit: 0, count: 0, longCount: 0, shortCount: 0, longProfit: 0, shortProfit: 0})
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment