Commit 6c488fd4 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent a6dde5c3
......@@ -77,7 +77,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if (data[i].profit <0) {
allLossProfit=allLossProfit+data[i].profit
allLossProfit=allLossProfit+Math.abs(data[i].profit)
countDrop++
}
else {
......@@ -89,7 +89,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
// if (countDrop <fft)
// continue
if (allLossProfit> fftPercent)
if (Math.abs(allLossProfit)< Math.abs(data[i].profit))
continue
}
runBefore=true
......
let _=require('lodash')
console.log(percentageMinus(100,1))
function percentageMinus(base, per) {
base = parseFloat(base)
per = parseFloat(per)
let percentager = per / 100
let temp = base * percentager
return temp
}
\ No newline at end of file
console.log(typeof Math.abs(-10.2))
\ 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