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

init

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