Commit 31288bf3 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 3667f1b7
...@@ -5,6 +5,7 @@ let plus = 'plus' ...@@ -5,6 +5,7 @@ let plus = 'plus'
let zarib = 'zarib' let zarib = 'zarib'
let base = 'base' let base = 'base'
let dynamic = 'dynamic' let dynamic = 'dynamic'
let dynamic2 = 'dynamic2'
function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss) { function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss) {
...@@ -67,6 +68,13 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss) { ...@@ -67,6 +68,13 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss) {
money = percentage2(lastMoney, config.param * curDrawDown) money = percentage2(lastMoney, config.param * curDrawDown)
} }
} }
else if (config.type === dynamic2) {
if (curDrawDown <= 0)
money = lastMoney
else {
money = lastMoney * (config.param +(curDrawDown/10))
}
}
} }
let riskfree = false let riskfree = false
if (step > riskFreeLevel) if (step > riskFreeLevel)
......
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