Commit 5130c200 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent 5e65822b
...@@ -75,6 +75,8 @@ async function generateByDrawDown(timestamp, arr) { ...@@ -75,6 +75,8 @@ async function generateByDrawDown(timestamp, arr) {
async function run(root, name, directory, timestamp) { async function run(root, name, directory, timestamp) {
// let directory = await fs.readdirSync('result') // let directory = await fs.readdirSync('result')
let con2 = await fs.readFileSync('./con2.json', 'utf8')
con2 = JSON.parse(con2)
let arr2 = [] let arr2 = []
let arrFinal = [] let arrFinal = []
let last = [] let last = []
...@@ -119,16 +121,21 @@ async function run(root, name, directory, timestamp) { ...@@ -119,16 +121,21 @@ async function run(root, name, directory, timestamp) {
let las = [] let las = []
for (let i = 0; i < last.length; i++) { for (let i = 0; i < last.length; i++) {
if (i < last.length) if (i < last.length)
if (last[i].total > 0 && last[i].pftrade>= 0.9 ) { if (last[i].total > 0 && last[i].pftrade >= 0.9) {
delete last[i].durDetailText delete last[i].durDetailText
delete last[i].metaDetailText delete last[i].metaDetailText
let needContinue = false
for (let z = 0; z < con2.length; z++) {
if (con2[z] === last[i].type.split('targetPercentage:false')[1])
needContinue = true
}
if (needContinue)
continue
las.push(last[i]) las.push(last[i])
} }
} }
createfileADV(root, timestamp, name, JSON.stringify(las, null, 2)) createfileADV(root, timestamp, name, JSON.stringify(las, null, 2))
last = [] last = []
......
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