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
1e681c6a
Commit
1e681c6a
authored
Mar 15, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
fc9d4c70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
ai.js
ai.js
+10
-10
run.js
run.js
+5
-0
No files found.
ai.js
View file @
1e681c6a
...
...
@@ -185,16 +185,16 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if
(
endDays
>
maxDays
)
maxDays
=
endDays
let
runnigTime
=
0
runnigTime
=
calculateRunnigTime
(
data
[
i
].
side
,
data
[
i
].
unixOpen
,
data
[
i
].
unixClose
,
d
.
targetPrice
)
if
(
step
!==
0
)
runnigTime
=
runnigTime
+
(
unixMid
-
unixStart
)
runnigTime
=
runnigTime
/
3600
if
(
needPrintData
)
obj
.
runnigTime
=
runnigTime
maxRuntime
=
maxRuntime
+
runnigTime
//
let runnigTime = 0
//
runnigTime = calculateRunnigTime(data[i].side, data[i].unixOpen, data[i].unixClose, d.targetPrice)
//
if (step !== 0)
//
runnigTime = runnigTime + (unixMid - unixStart)
//
//
runnigTime = runnigTime / 3600
//
if (needPrintData)
//
obj.runnigTime = runnigTime
//
//
maxRuntime = maxRuntime + runnigTime
listDays
.
push
(
endDays
)
...
...
run.js
View file @
1e681c6a
...
...
@@ -47,6 +47,7 @@ async function run() {
}
arr
=
await
Promise
.
all
(
arr
)
let
count
=
0
let
arr2
=
[]
let
arr3
=
[]
...
...
@@ -62,6 +63,10 @@ async function run() {
// console.log(arr2)
arr2
=
_
.
without
(
arr2
,
undefined
,
null
);
arr2
=
_
.
orderBy
(
arr2
,
[
'
profitPerMonthDrawDown
'
],
[
'
desc
'
]);
let
arr20Max
=
[]
let
arr1000Compound
=
[]
...
...
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