Commit 1eca52e8 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 7fd2e4a3
1
\ No newline at end of file
......@@ -10,11 +10,15 @@ let balance =lastBalance
init()
let base=1
let com
//profitLossString
//drawDownString
async function init() {
com = await fs.readFileSync('t.json', 'utf8');
let bad = await fs.readFileSync('bad.txt', 'utf8');
base=parseFloat(bad)
com = JSON.parse(com)
......@@ -70,6 +74,7 @@ function run()
if (worth < base) {
base=worth
console.log(arrNew[0].sum,balance,worth)
createfileADV(worth)
}
// let start=false
// let arr2=[]
......@@ -155,7 +160,7 @@ function get(date) {
function createfileADV(data) {
// console.log(data)
return new Promise(function (resolve, reject) {
fs.writeFile('worth.json', data, 'utf8', function (err) {
fs.writeFile('bad.txt', data, 'utf8', function (err) {
if (err) reject(err);
else resolve(data);
});
......
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