Commit 7071e881 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 406463c9
...@@ -25,7 +25,7 @@ function run(data, config,risk,pfTrade) { ...@@ -25,7 +25,7 @@ function run(data, config,risk,pfTrade) {
let newP=dur/data.length let newP=dur/data.length
// console.log(data.length) // console.log(data.length)
// console.log(newP) // console.log(newP)
if (pfTrade>newP) if (pfTrade<newP)
return null return null
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
...@@ -89,10 +89,17 @@ function run(data, config,risk,pfTrade) { ...@@ -89,10 +89,17 @@ function run(data, config,risk,pfTrade) {
let per=parseFloat((count/total)*100).toFixed(1) let per=parseFloat((count/total)*100).toFixed(1)
newLevel.push(i+':'+count+':'+per+'%')
// newLevelText=newLevelText+i+':'+count+':'+per+'%'+',' newLevelText=newLevelText+i+':'+count+':'+per+'%'+','
// if ((i+2) %12 ===0) if ((i+2) %12 ===0)
// newLevelText=newLevelText+'\n' {
newLevelText+newLevelText+'\\n'
}
} }
// console.log(newLevelText) // console.log(newLevelText)
...@@ -161,7 +168,7 @@ newLevel.push(i+':'+count+':'+per+'%') ...@@ -161,7 +168,7 @@ newLevel.push(i+':'+count+':'+per+'%')
allocatedReserve: (maxAllocatedMoney) / Math.abs(maxReserve), allocatedReserve: (maxAllocatedMoney) / Math.abs(maxReserve),
minus: minus, minus: minus,
risk:risk, risk:risk,
levels:newLevel, levels:newLevelText,
pftrade:newP, pftrade:newP,
countOfTrade:data.length 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