Commit 02f63419 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 05ed24d4
......@@ -70,14 +70,21 @@ let index=arrNew[0].index
}
}
let t=''
for (let i=0;i<arrNew.length;i++)
{
let det=get(arrNew[i].date)
if (worth ===arrNew[i].sum)
console.log('Worth* ->',arrNew[i].date,'Profits->',arrNew[i].sum,'Count->',det.count,'Longs->',det.longCount,'Long Profit->',det.longProfit,'Shorts->',det.shortCount,'Short Profit=>',det.shortProfit)
else
console.log(arrNew[i].date,'Profits->',arrNew[i].sum,'Count->',det.count,'Longs->',det.longCount,'Long Profit->',det.longProfit,'Shorts->',det.shortCount,'Short Profit=>',det.shortProfit)
t='****Worth**** ->'
t=t+arrNew[i].date
t=t+' '+' Profits->'+arrNew[i].sum +' Count->'+det.count +' Longs->'+det.longCount+' Long Profit->'+det.longProfit+' Shorts->'+det.shortCount+' Short Profit=>'+det.shortProfit+'\n'
}
createRunResfileADV(t)
// console.log(arrNew)
}
......@@ -116,3 +123,14 @@ function get(date) {
}
function createRunResfileADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile('worth.txt', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
});
}
\ No newline at end of file
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