Commit 526bdb99 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent cefba9d3
{
"sort": "platform",
"alocatedReserve": 20,
"data": [
{
"type": "plus",
......
......@@ -28,7 +28,7 @@ run()
async function run()
{
let obj={sort:'profitPerMonth'}
let obj={sort:'profitPerMonth',alocatedReserve:20}
let all=[]
for (let i=0;i<arr.length;i++)
all.push(add(arr[i]))
......
......@@ -32,6 +32,7 @@ async function run() {
// console.log(arr2)
arr2 = _.orderBy(arr2, [configs.sort], ['desc']);
let arr20Max=[]
let arrReserv=_.orderBy(arr2, ['percentage'], ['asc']);
let arrResrv200=[]
for (let i = 0; i < 200; i++) {
......@@ -39,6 +40,13 @@ async function run() {
arrResrv200.push(arrReserv[i])
}
for (let i=0;i<arr2.length;i++)
{
let t=(arr2[i].maxAllocatedMoney)/Math.abs(arr2[i].maxReseve)
if (t>configs.alocatedReserve)
arr20Max.push(arr2[i])
}
// for (let i=0;i<files.length;i++)
......@@ -46,6 +54,7 @@ async function run() {
createfile2(JSON.stringify(arr3, null, 2))
createfileADV('percentage',JSON.stringify(arrReserv, null, 2))
createfileADV('percentage200',JSON.stringify(arrResrv200, null, 2))
createfileADV('allocatedReserve',JSON.stringify(arr20Max, null, 2))
// console.log(perf.stop())
console.log('Done')
// process.exit(0)
......
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