Commit 1c8ae028 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 2ca8337f
...@@ -55,11 +55,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT ...@@ -55,11 +55,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT
return null return null
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
// if (maxDays > maxTradeDays ) if (maxDays > maxTradeDays )
// return null return null
let obj let obj
if (step === 0) { if (step === 0) {
// startDays=data[i].openDate startDays=data[i].openDate
money = config.base money = config.base
} }
else { else {
...@@ -130,7 +130,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT ...@@ -130,7 +130,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT
obj.maxAllocatedMoney = maxAllocatedMoney obj.maxAllocatedMoney = maxAllocatedMoney
obj.maxLevel = maxLevel obj.maxLevel = maxLevel
obj.step = step obj.step = step
// obj.maxDays = maxDays obj.maxDays = maxDays
} }
...@@ -152,11 +152,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT ...@@ -152,11 +152,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs,maxT
} }
if (d.done === true) { if (d.done === true) {
// let endDays = getMinDiff(startDays, data[i].closeDate) let endDays = getMinDiff(startDays, data[i].closeDate)
// // console.log(typeof endDays) // console.log(typeof endDays)
// //console.log(endDays) //console.log(endDays)
// if (endDays > maxDays) if (endDays > maxDays)
// maxDays = endDays maxDays = endDays
// console.log(maxDays) // console.log(maxDays)
levels.push(step) levels.push(step)
......
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