Commit d16291a5 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 343419b8
......@@ -570,7 +570,9 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
continue
allDone++
if (data[i].profit > 0.1)
baseCompund = baseCompund + percentageAdv(baseCompund,data[i].profit - 0.1)
baseCompund = baseCompund + percentage2(baseCompund, data[i].profit - 0.1)
if (data[i].profit > 0.1) {
tempMeta = 0
......@@ -679,7 +681,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
obj.currentDrawDown = 0
obj.maxReserve = baseDrawDown
obj.maxMeta=baseMeta
obj.maxMeta = baseMeta
obj.maxAllocatedMoney = maxAllocatedMoney
obj.maxLevel = maxLevel
obj.step = step
......@@ -1196,6 +1198,14 @@ function percentage(base, per) {
let temp = base * percentager
return base + temp
}
function percentage2(base, per) {
base = parseFloat(base)
per = parseFloat(per)
let percentager = per / 100
let temp = base * percentager
return temp
}
function percentageMinus(base, per) {
......
......@@ -14,9 +14,12 @@
// console.log(f.length)
// console.log(sum / f.length)
console.log(percentage(100,2))
function percentage(base, per) {
let t='2017-08-21 00:30:00'
let ft=t.split('-')
let y=parseFloat(ft[0])
let m=parseFloat(ft[1])
console.log(y,m)
\ No newline at end of file
base = parseFloat(base)
per = parseFloat(per)
let percentager = per / 100
let temp = base * percentager
return temp
}
\ No newline at end of file
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