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

init

parent fc9d4c70
...@@ -185,16 +185,16 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -185,16 +185,16 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (endDays > maxDays) if (endDays > maxDays)
maxDays = endDays maxDays = endDays
let runnigTime = 0 // let runnigTime = 0
runnigTime = calculateRunnigTime(data[i].side, data[i].unixOpen, data[i].unixClose, d.targetPrice) // runnigTime = calculateRunnigTime(data[i].side, data[i].unixOpen, data[i].unixClose, d.targetPrice)
if (step !== 0) // if (step !== 0)
runnigTime = runnigTime + (unixMid - unixStart) // runnigTime = runnigTime + (unixMid - unixStart)
//
runnigTime = runnigTime / 3600 // runnigTime = runnigTime / 3600
if (needPrintData) // if (needPrintData)
obj.runnigTime = runnigTime // obj.runnigTime = runnigTime
//
maxRuntime = maxRuntime + runnigTime // maxRuntime = maxRuntime + runnigTime
listDays.push(endDays) listDays.push(endDays)
......
...@@ -47,6 +47,7 @@ async function run() { ...@@ -47,6 +47,7 @@ async function run() {
} }
arr = await Promise.all(arr) arr = await Promise.all(arr)
let count = 0 let count = 0
let arr2 = [] let arr2 = []
let arr3 = [] let arr3 = []
...@@ -62,6 +63,10 @@ async function run() { ...@@ -62,6 +63,10 @@ async function run() {
// console.log(arr2) // console.log(arr2)
arr2 = _.without(arr2, undefined, null); arr2 = _.without(arr2, undefined, null);
arr2 = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']); arr2 = _.orderBy(arr2, ['profitPerMonthDrawDown'], ['desc']);
let arr20Max = [] let arr20Max = []
let arr1000Compound = [] let arr1000Compound = []
......
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