Commit 261d9def authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 2ec3c1ea
...@@ -123,7 +123,7 @@ async function run() ...@@ -123,7 +123,7 @@ async function run()
} }
arrNew = _.orderBy(arrNew, ['sum']) arrNew = _.orderBy(arrNew, ['sum'])
// console.log(arr) console.log(arrNew)
for (let i=0;i<arr.length;i++) for (let i=0;i<arr.length;i++)
addDate(arr[i]) addDate(arr[i])
...@@ -147,7 +147,7 @@ async function run() ...@@ -147,7 +147,7 @@ async function run()
} }
arrDate = _.orderBy(arrDate, ['sum']) arrDate = _.orderBy(arrDate, ['sum'])
console.log(arrDate) // console.log(dates)
// console.log('Balance ->',balance) // console.log('Balance ->',balance)
// console.log('Worth ->',arrNew[0]) // console.log('Worth ->',arrNew[0])
......
...@@ -11,7 +11,7 @@ let balance = lastBalance ...@@ -11,7 +11,7 @@ let balance = lastBalance
init() init()
let base = 1 let base = 1
let com let coms
//profitLossString //profitLossString
//drawDownString //drawDownString
...@@ -30,14 +30,14 @@ async function init() { ...@@ -30,14 +30,14 @@ async function init() {
} catch (e) { } catch (e) {
} }
com = await fs.readFileSync('t.json', 'utf8'); coms = await fs.readFileSync('t.json', 'utf8');
let bad = await fs.readFileSync('bad.txt', 'utf8'); let bad = await fs.readFileSync('bad.txt', 'utf8');
bad = JSON.parse(bad) bad = JSON.parse(bad)
base = parseFloat(bad.bad) base = parseFloat(bad.bad)
//console.log(bad) //console.log(bad)
com = JSON.parse(com) coms = JSON.parse(coms)
run() run()
...@@ -77,7 +77,8 @@ async function sleep(millis) { ...@@ -77,7 +77,8 @@ async function sleep(millis) {
} }
async function run() { async function run() {
com = _.shuffle(com) coms = _.shuffle(coms)
let com = _.uniqBy(coms, 'platform');
balance = lastBalance balance = lastBalance
arr = [] arr = []
resetDates() resetDates()
......
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