Commit d0b021bb authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent c7bf4b50
...@@ -155,7 +155,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -155,7 +155,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (d.done === true) { if (d.done === true) {
let endDays = getNewMinDiff(startDays, data[i].closeDate) let endDays = getNewMinDiff(startDays, data[i].closeDate)
detailLevel.push({step: step, dur: endDays}) detailLevel.push({step: step, dur: endDays})
durDetail.push({dur:endDays.toFixed(2),step:step,days:startDays.split(' ')[0]+'-'+data[i].closeDate.split(' ')[0]}) durDetail.push({dur:endDays,step:step,days:startDays.split(' ')[0]+'-'+data[i].closeDate.split(' ')[0]})
// console.log(typeof endDays) // console.log(typeof endDays)
//console.log(endDays) //console.log(endDays)
if (endDays > maxDays) if (endDays > maxDays)
...@@ -258,7 +258,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -258,7 +258,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
{ {
if (i>10) if (i>10)
break break
durDetailText=durDetailText+durDetail[i].step+':'+durDetail[i].dur+':'+durDetail[i].days+'///' durDetailText=durDetailText+durDetail[i].step+':'+parseFloat(durDetail[i].dur).toFixed(2)+':'+durDetail[i].days+'///'
} }
// console.log(newLevelText) // console.log(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