Commit bb34606d authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent 5eb7f22d
...@@ -80,36 +80,36 @@ async function run(name, directory, timestamp) { ...@@ -80,36 +80,36 @@ async function run(name, directory, timestamp) {
if (name === 'compound1000' || name === 'allocatedReserveCompoundUnder3' || name === 'allocatedReserveCompoundUnder2') if (name === 'compound1000' || name === 'allocatedReserveCompoundUnder3' || name === 'allocatedReserveCompoundUnder2')
last = _.orderBy(arr2, ['CompoundPerMonthDrawDown'], ['desc']); last = _.orderBy(arr2, ['CompoundPerMonthDrawDown'], ['desc']);
if (name === 'allocatedReservePerMonthUnder2' || name === 'allocatedReservePerMonthUnder3') { // if (name === 'allocatedReservePerMonthUnder2' || name === 'allocatedReservePerMonthUnder3') {
let arr20Max = [] // let arr20Max = []
for (let i = 0; i < last.length; i++) { // for (let i = 0; i < last.length; i++) {
if (name === 'allocatedReservePerMonthUnder2') // if (name === 'allocatedReservePerMonthUnder2')
alocatedReserve = 2 // alocatedReserve = 2
else // else
alocatedReserve = 3 // alocatedReserve = 3
//
if (last[i].allocatedReserve < alocatedReserve) // if (last[i].allocatedReserve < alocatedReserve)
arr20Max.push(last[i]) // arr20Max.push(last[i])
} // }
//
last = arr20Max // last = arr20Max
} // }
//
if (name === 'allocatedReserveCompoundUnder2' || name === 'allocatedReserveCompoundUnder3') { // if (name === 'allocatedReserveCompoundUnder2' || name === 'allocatedReserveCompoundUnder3') {
let arr20Max = [] // let arr20Max = []
for (let i = 0; i < last.length; i++) { // for (let i = 0; i < last.length; i++) {
if (name === 'allocatedReserveCompoundUnder2') // if (name === 'allocatedReserveCompoundUnder2')
alocatedReserve = 2 // alocatedReserve = 2
else // else
alocatedReserve = 3 // alocatedReserve = 3
//
if (last[i].allocatedReserve < alocatedReserve) // if (last[i].allocatedReserve < alocatedReserve)
arr20Max.push(last[i]) // arr20Max.push(last[i])
} // }
//
last = arr20Max // last = arr20Max
} // }
//
let las = [] let las = []
for (let i = 0; i < 1000; i++) { for (let i = 0; i < 1000; i++) {
......
...@@ -80,35 +80,35 @@ async function run(name, directory, timestamp) { ...@@ -80,35 +80,35 @@ async function run(name, directory, timestamp) {
if (name === 'compound1000' || name === 'allocatedReserveCompoundUnder3' || name === 'allocatedReserveCompoundUnder2') if (name === 'compound1000' || name === 'allocatedReserveCompoundUnder3' || name === 'allocatedReserveCompoundUnder2')
last = _.orderBy(arr2, ['CompoundPerMonthDrawDown'], ['desc']); last = _.orderBy(arr2, ['CompoundPerMonthDrawDown'], ['desc']);
if (name === 'allocatedReservePerMonthUnder2' || name === 'allocatedReservePerMonthUnder3') { // if (name === 'allocatedReservePerMonthUnder2' || name === 'allocatedReservePerMonthUnder3') {
let arr20Max = [] // let arr20Max = []
for (let i = 0; i < last.length; i++) { // for (let i = 0; i < last.length; i++) {
if (name === 'allocatedReservePerMonthUnder2') // if (name === 'allocatedReservePerMonthUnder2')
alocatedReserve = 2 // alocatedReserve = 2
else // else
alocatedReserve = 3 // alocatedReserve = 3
//
if (last[i].allocatedReserve < alocatedReserve) // if (last[i].allocatedReserve < alocatedReserve)
arr20Max.push(last[i]) // arr20Max.push(last[i])
} // }
//
last = arr20Max // last = arr20Max
} // }
//
if (name === 'allocatedReserveCompoundUnder2' || name === 'allocatedReserveCompoundUnder3') { // if (name === 'allocatedReserveCompoundUnder2' || name === 'allocatedReserveCompoundUnder3') {
let arr20Max = [] // let arr20Max = []
for (let i = 0; i < last.length; i++) { // for (let i = 0; i < last.length; i++) {
if (name === 'allocatedReserveCompoundUnder2') // if (name === 'allocatedReserveCompoundUnder2')
alocatedReserve = 2 // alocatedReserve = 2
else // else
alocatedReserve = 3 // alocatedReserve = 3
//
if (last[i].allocatedReserve < alocatedReserve) // if (last[i].allocatedReserve < alocatedReserve)
arr20Max.push(last[i]) // arr20Max.push(last[i])
} // }
//
last = arr20Max // last = arr20Max
} // }
let las = [] let las = []
......
...@@ -89,8 +89,8 @@ async function run() { ...@@ -89,8 +89,8 @@ async function run() {
createfileADV('profitPerMonth1000', JSON.stringify(arr3, null, 2)) createfileADV('profitPerMonth1000', JSON.stringify(arr3, null, 2))
createfileADV('percentage1000', JSON.stringify(arrResrv200, null, 2)) createfileADV('percentage1000', JSON.stringify(arrResrv200, null, 2))
createfileADV('compound1000', JSON.stringify(arr1000Compound, null, 2)) createfileADV('compound1000', JSON.stringify(arr1000Compound, null, 2))
createfileADV('allocatedReservePerMonthUnder3', JSON.stringify(arr20MaxNew, null, 2)) // createfileADV('allocatedReservePerMonthUnder3', JSON.stringify(arr20MaxNew, null, 2))
createfileADV('allocatedReserveCompoundUnder3' , JSON.stringify(arrReservCompoundNew, null, 2)) // createfileADV('allocatedReserveCompoundUnder3' , JSON.stringify(arrReservCompoundNew, null, 2))
arr20Max=[] arr20Max=[]
for (let i = 0; i < arr2.length; i++) { for (let i = 0; i < arr2.length; i++) {
...@@ -115,8 +115,8 @@ async function run() { ...@@ -115,8 +115,8 @@ async function run() {
arrReservCompoundNew.push(arrReservCompound[i]) arrReservCompoundNew.push(arrReservCompound[i])
} }
createfileADV('allocatedReservePerMonthUnder2', JSON.stringify(arr20MaxNew, null, 2)) // createfileADV('allocatedReservePerMonthUnder2', JSON.stringify(arr20MaxNew, null, 2))
createfileADV('allocatedReserveCompoundUnder2' , JSON.stringify(arrReservCompoundNew, null, 2)) // createfileADV('allocatedReserveCompoundUnder2' , JSON.stringify(arrReservCompoundNew, null, 2))
......
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