Commit d601279d authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent a473345e
...@@ -575,6 +575,25 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -575,6 +575,25 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
baseCompund = baseCompund + percentage2(baseCompund, data[i].profit - 0.1) baseCompund = baseCompund + percentage2(baseCompund, data[i].profit - 0.1)
if (data[i].profit > 0.1) {
tempMeta = 0
tempDrawDown = 0
} else {
tempMeta = tempMeta + data[i].profit + 0.1
tempDrawDown = tempDrawDown + data[i].drawDown
// console.log(tempMeta,tempDrawDown)
if (tempMeta < baseMeta)
baseMeta = tempMeta
if (tempDrawDown < baseDrawDown)
baseDrawDown = tempDrawDown
}
if (data[i].side === 'LONG') { if (data[i].side === 'LONG') {
allLongDone++ allLongDone++
...@@ -1001,7 +1020,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max ...@@ -1001,7 +1020,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
levels: newLevelText, levels: newLevelText,
countOfTrade: data.length
} }
......
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