Commit 1087fbdc authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 31da9710
......@@ -56,7 +56,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs) {
for (let i = 0; i < data.length; i++) {
let obj
if (step === 0) {
startDays=data[i].openDate
// startDays=data[i].openDate
money = config.base
}
else {
......@@ -127,7 +127,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs) {
obj.maxAllocatedMoney = maxAllocatedMoney
obj.maxLevel = maxLevel
obj.step = step
obj.maxDays = maxDays
// obj.maxDays = maxDays
}
......@@ -149,11 +149,11 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs) {
}
if (d.done === true) {
let endDays = getMinDiff(startDays, data[i].closeDate)
// console.log(typeof endDays)
//console.log(endDays)
if (endDays > maxDays)
maxDays = endDays
// let endDays = getMinDiff(startDays, data[i].closeDate)
// // console.log(typeof endDays)
// //console.log(endDays)
// if (endDays > maxDays)
// maxDays = endDays
// console.log(maxDays)
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