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
477e09b1
Commit
477e09b1
authored
Jun 16, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
3fc881db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
torobche.js
torobche.js
+15
-10
No files found.
torobche.js
View file @
477e09b1
...
...
@@ -8,15 +8,21 @@ let arr = []
let
lastBalance
=
1000
let
balance
=
lastBalance
init
()
let
com
//profitLossString
//drawDownString
async
function
init
()
{
let
com
=
await
fs
.
readFileSync
(
'
t.json
'
,
'
utf8
'
);
com
=
await
fs
.
readFileSync
(
'
t.json
'
,
'
utf8
'
);
com
=
JSON
.
parse
(
com
)
com
=
_
.
shuffle
(
com
)
}
function
run
()
{
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
let
closeDate
=
com
[
i
].
closeDate
.
split
(
'
_
'
)
let
profits
=
com
[
i
].
profitLossString
.
split
(
'
_
'
)
...
...
@@ -66,10 +72,10 @@ async function init() {
start
=
true
arr2
.
push
(
arr
[
i
])
}
// else if (arr[i].date === arrNew[0].date )
// {
// arr2.push(arr[i])
// break
// else if (arr[i].date === arrNew[0].date )
// {
// arr2.push(arr[i])
// break
// }
else
if
(
start
)
arr2
.
push
(
arr
[
i
])
...
...
@@ -81,9 +87,9 @@ async function init() {
balance
=
balance
+
arr2
[
i
].
profit
arr2
[
i
].
balance
=
balance
}
createfileADV
(
JSON
.
stringify
(
arr2
,
null
,
2
))
//
createfileADV(JSON.stringify(arr2, null, 2))
// let index=arrNew[0].index
// let index=arrNew[0].index
// arrNew=[]
// for (let i = index; i < index+1; i++) {
// let sums = 0
...
...
@@ -100,8 +106,7 @@ async function init() {
// }
//
// }
return
run
()
}
...
...
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