Commit f937555b authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 49b51e14
...@@ -58,16 +58,20 @@ async function analyse(body) { ...@@ -58,16 +58,20 @@ async function analyse(body) {
//Ticket,Open_Time,Type,Symbol,Open_Price,Close_Price,Close_Time,dPrfPipWrtOpPrPc,dAgeHiPrfInPrPc_RunUpPc,dAgeLoPrfInPrPc_DrawDownPc //Ticket,Open_Time,Type,Symbol,Open_Price,Close_Price,Close_Time,dPrfPipWrtOpPrPc,dAgeHiPrfInPrPc_RunUpPc,dAgeLoPrfInPrPc_DrawDownPc
let final = '0,00:00,' let final = '0,00:00,'
if (obj.side === 'Long') if (obj.side === 'Long') {
final = final + 'Buy' final = final + 'Buy'
else obj.side='Buy'
}
else {
final = final + 'Sell' final = final + 'Sell'
obj.side='Sell'
}
final = final + ',' final = final + ','
final = final + obj.entry + ',' + obj.exit + ',' + obj.closeTime + ',' + obj.profit + ',' + obj.runUp + ',' + obj.drawDown final = final + obj.entry + ',' + obj.exit + ',' + obj.closeTime + ',' + obj.profit + ',' + obj.runUp + ',' + obj.drawDown
let file = await fs.readFileSync('temp/' + indicator + '.csv', 'utf8') let file = await fs.readFileSync('temp/' + indicator + '.csv', 'utf8')
file = file.match(/.+/g) file = file.match(/.+/g)
console.log('try Check ',obj.side,file[file.length - 1]) // console.log('try Check ',obj.side,file[file.length - 1])
if (file.length > 2 && !file[file.length - 1].includes(obj.side)) if (file.length > 2 && !file[file.length - 1].includes(obj.side))
appendCsv(final, indicator) appendCsv(final, indicator)
} }
......
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