Commit fef69b47 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent d375353b
...@@ -74,13 +74,17 @@ function run(data, config,risk) { ...@@ -74,13 +74,17 @@ function run(data, config,risk) {
maxAllocatedMoney=maxAllocatedMoney*config.param maxAllocatedMoney=maxAllocatedMoney*config.param
} }
let newLevel=[] // let newLevel=[]
let newLevelText=''
for (let i=0;i<(maxLevel+1);i++) for (let i=0;i<(maxLevel+1);i++)
{ {
let count=counter(i,levels) let count=counter(i,levels)
newLevel.push({level:i,count:count}) // newLevel.push({level:i,count:count})
newLevelText=newLevelText+i+':'+count+','
} }
// for (let i=0;i<newLevel)
let dur = getMinDiff(data[0].openDate, data[data.length - 1].closeDate) let dur = getMinDiff(data[0].openDate, data[data.length - 1].closeDate)
...@@ -144,7 +148,7 @@ function run(data, config,risk) { ...@@ -144,7 +148,7 @@ function run(data, config,risk) {
allocatedReserve: (maxAllocatedMoney) / Math.abs(maxReserve), allocatedReserve: (maxAllocatedMoney) / Math.abs(maxReserve),
minus: minus, minus: minus,
risk:risk, risk:risk,
levels:newLevel levels:newLevelText
} }
......
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