Commit 6e019298 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 42b66eab
...@@ -89,7 +89,7 @@ async function format(name) { ...@@ -89,7 +89,7 @@ async function format(name) {
// twoCounter++ // twoCounter++
console.log('from ' + res.length + ' red ' + con, ' max red:'+maxRed ,'Max red Timestamp:'+maxTimeRed ,' green:'+allGreeeCon +' max green:'+maxGreen + ' max green time end:'+maxTimeGreen) console.log('from ' + res.length + ' red ' + con, ' max red:'+maxRed ,'Max red Timestamp:'+maxTimeRed ,' green:'+allGreeeCon +' max green:'+maxGreen + ' max green time end:'+maxTimeGreen )
// console.log('total '+con +' avg runup:'+(allProfit/con)) // console.log('total '+con +' avg runup:'+(allProfit/con))
maxRedArray=_.orderBy(maxRedArray) maxRedArray=_.orderBy(maxRedArray)
maxRedArray=_.reverse(maxRedArray) maxRedArray=_.reverse(maxRedArray)
...@@ -103,9 +103,9 @@ async function format(name) { ...@@ -103,9 +103,9 @@ async function format(name) {
let newxGreenArray=[] let newxGreenArray=[]
for (let i=0;i<maxGreenArray.length;i++) for (let i=0;i<maxGreenArray.length;i++)
{ {
let counter=1 let counter=0
for (let j=0;j<maxGreenArray.length;j++) for (let j=0;j<maxGreenArray.length;j++)
if (maxGreenArray[i] ===maxRedArray[j]) if (maxGreenArray[i] ===maxGreenArray[j])
counter ++ counter ++
newxGreenArray.push({item:maxGreenArray[i],count:counter}) newxGreenArray.push({item:maxGreenArray[i],count:counter})
......
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