Commit 315dc5f8 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent f1d0668c
...@@ -100,7 +100,7 @@ function run(data, config) { ...@@ -100,7 +100,7 @@ function run(data, config) {
dur:dur, dur:dur,
totalFinal:totalFinal, totalFinal:totalFinal,
profitPerMonth:profitPerMonth+'%', profitPerMonth:Math.abs(profitPerMonth),
maxAllocatedMoney: maxAllocatedMoney, maxAllocatedMoney: maxAllocatedMoney,
avgAllocatedMoney: maxAllocatedMoney / total, avgAllocatedMoney: maxAllocatedMoney / total,
......
...@@ -4,17 +4,17 @@ let arr=[ ...@@ -4,17 +4,17 @@ let arr=[
{ {
type: "zarib", type: "zarib",
commision: 0.0008, commision: 0.0008,
paramStart: 100, paramStart: 1,
paramEnd: 1000, paramEnd: 3,
inidicator: 0.1 inidicator: 0.5
}, },
{ {
type: "base", type: "base",
commision: 0.0008, commision: 0.0008,
paramStart: 100, paramStart: 1,
paramEnd: 1000, paramEnd: 3,
inidicator: 0.1 inidicator: 0.5
} }
...@@ -28,7 +28,7 @@ run() ...@@ -28,7 +28,7 @@ run()
async function run() async function run()
{ {
let obj={sort:'percentage'} let obj={sort:'profitPerMonth'}
let all=[] let all=[]
for (let i=0;i<arr.length;i++) for (let i=0;i<arr.length;i++)
all.push(add(arr[i])) all.push(add(arr[i]))
......
...@@ -24,13 +24,13 @@ async function run() { ...@@ -24,13 +24,13 @@ async function run() {
arr2.push(inline[j]) arr2.push(inline[j])
} }
} }
// console.log(arr2) // console.log(arr2)
arr2 = _.orderBy(arr2, [configs.sort], ['asc']); arr2 = _.orderBy(arr2, [configs.sort], ['desc']);
for (let i = 0; i < 200; i++) for (let i = 0; i < 200; i++)
arr3.push(arr2[i]) arr3.push(arr2[i])
......
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