Commit e98bf3a6 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent b08ed8d3
......@@ -70,12 +70,15 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
// console.log(newP)
if (pfTrade < newP)
return null
for (let i = 0; i < data.length; i++) {
if (maxDays > maxTradeDays)
return null
if (data[i].profit <0) {
allLossProfit=allLossProfit+data[i].profit
countDrop++
......@@ -92,6 +95,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (allLossProfit> fftPercent)
continue
}
runBefore=true
let obj
if (step === 0) {
......
......@@ -52,16 +52,17 @@ async function run() {
let count = 0
let arr2 = []
let arr3 = []
// console.log(arr)
for (let i = 0; i < arr.length; i++) {
let inline = arr[i]
for (let j = 0; j < inline.length; j++) {
if (inline[j].maxLevel < configs.level)
if (inline[j].maxLevel < configs.level)
arr2.push(inline[j])
}
}
// console.log(arr2)
arr2 = _.without(arr2, undefined, null);
......
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