Commit c1052238 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 6a0dc99b
......@@ -28,7 +28,32 @@ async function init() {
let com = await fs.readFileSync('com.json', 'utf8');
com = JSON.parse(com)
for (let i = 0; i < com.length; i++) {
com[i].platform = com[i].platform.toLowerCase()
let t = com[i].platform
t = t.split('_')
let pair = t[3].replace('usdt', '').replace('usd', '')
let lp = t[4].replace('lp', 'Lp')
com[i].lp = lp
let p = t[t.length - 1].split('.')
p = p[0].split(pair)[0]
let uniq = pair + lp + p + capital(com[i].type.split(' ')[5]) + parseFloat(com[i].type.split(' ')[6]) * -10
com[i].uniq = uniq + '_' + com[i].avgRunup + '_' + com[i].avgDrawdown + '_' + com[i].type.split(' ')[5] + '_' + (parseFloat(com[i].type.split(' ')[6]) * -1)
}
com = _.uniqBy(com, 'lp');
let newCom = []
for (let i = 0; i < com.length; i++) {
newCom.push(com[i])
}
com = newCom
createComResfileADV(JSON.stringify(com, null, 2))
for (let i = 0; i < com.length; i++) {
......@@ -76,32 +101,6 @@ async function init() {
}
arr = _.uniqBy(arr, 'name');
createfinalADV(JSON.stringify(arr, null, 2))
for (let i = 0; i < com.length; i++) {
com[i].platform = com[i].platform.toLowerCase()
let t = com[i].platform
t = t.split('_')
let pair = t[3].replace('usdt', '').replace('usd', '')
// let lp = t[4].replace('lp', 'Lp')
// com[i].lp = lp
let p = t[t.length - 1].split('.')
p = p[0].split(pair)[0]
let uniq = pair + com[i].lp + p + capital(com[i].type.split(' ')[5]) + parseFloat(com[i].type.split(' ')[6]) * -10
com[i].uniq = uniq + '_' + com[i].avgRunup + '_' + com[i].avgDrawdown + '_' + com[i].type.split(' ')[5] + '_' + (parseFloat(com[i].type.split(' ')[6]) * -1)
}
com = _.uniqBy(com, 'lp');
let newCom = []
for (let i = 0; i < com.length; i++) {
newCom.push(com[i])
}
com = newCom
createComResfileADV(JSON.stringify(com, null, 2))
// console.log(arr)
......
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