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
e98bf3a6
Commit
e98bf3a6
authored
Mar 24, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
b08ed8d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ai.js
ai.js
+4
-0
run.js
run.js
+3
-2
No files found.
ai.js
View file @
e98bf3a6
...
...
@@ -70,12 +70,15 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
// console.log(newP)
if
(
pfTrade
<
newP
)
return
null
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
maxDays
>
maxTradeDays
)
return
null
if
(
data
[
i
].
profit
<
0
)
{
allLossProfit
=
allLossProfit
+
data
[
i
].
profit
countDrop
++
...
...
@@ -92,6 +95,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel, detail, loss, durs, max
if
(
allLossProfit
>
fftPercent
)
continue
}
runBefore
=
true
let
obj
if
(
step
===
0
)
{
...
...
run.js
View file @
e98bf3a6
...
...
@@ -52,16 +52,17 @@ async function run() {
let
count
=
0
let
arr2
=
[]
let
arr3
=
[]
// console.log(arr)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
inline
=
arr
[
i
]
for
(
let
j
=
0
;
j
<
inline
.
length
;
j
++
)
{
if
(
inline
[
j
].
maxLevel
<
configs
.
level
)
if
(
inline
[
j
].
maxLevel
<
configs
.
level
)
arr2
.
push
(
inline
[
j
])
}
}
// console.log(arr2)
arr2
=
_
.
without
(
arr2
,
undefined
,
null
);
...
...
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