Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ai
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
ai
Commits
1eca52e8
Commit
1eca52e8
authored
Jun 17, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
7fd2e4a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
bad.txt
bad.txt
+1
-0
torobche.js
torobche.js
+6
-1
No files found.
bad.txt
0 → 100644
View file @
1eca52e8
1
\ No newline at end of file
torobche.js
View file @
1eca52e8
...
@@ -10,11 +10,15 @@ let balance =lastBalance
...
@@ -10,11 +10,15 @@ let balance =lastBalance
init
()
init
()
let
base
=
1
let
base
=
1
let
com
let
com
//profitLossString
//profitLossString
//drawDownString
//drawDownString
async
function
init
()
{
async
function
init
()
{
com
=
await
fs
.
readFileSync
(
'
t.json
'
,
'
utf8
'
);
com
=
await
fs
.
readFileSync
(
'
t.json
'
,
'
utf8
'
);
let
bad
=
await
fs
.
readFileSync
(
'
bad.txt
'
,
'
utf8
'
);
base
=
parseFloat
(
bad
)
com
=
JSON
.
parse
(
com
)
com
=
JSON
.
parse
(
com
)
...
@@ -70,6 +74,7 @@ function run()
...
@@ -70,6 +74,7 @@ function run()
if
(
worth
<
base
)
{
if
(
worth
<
base
)
{
base
=
worth
base
=
worth
console
.
log
(
arrNew
[
0
].
sum
,
balance
,
worth
)
console
.
log
(
arrNew
[
0
].
sum
,
balance
,
worth
)
createfileADV
(
worth
)
}
}
// let start=false
// let start=false
// let arr2=[]
// let arr2=[]
...
@@ -155,7 +160,7 @@ function get(date) {
...
@@ -155,7 +160,7 @@ function get(date) {
function
createfileADV
(
data
)
{
function
createfileADV
(
data
)
{
// console.log(data)
// console.log(data)
return
new
Promise
(
function
(
resolve
,
reject
)
{
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
);
if
(
err
)
reject
(
err
);
else
resolve
(
data
);
else
resolve
(
data
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment