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

init

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