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
b58483f9
Commit
b58483f9
authored
Apr 21, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pu
parent
94881167
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
generate.js
generate.js
+18
-12
No files found.
generate.js
View file @
b58483f9
...
@@ -25,18 +25,24 @@ async function run()
...
@@ -25,18 +25,24 @@ async function run()
let
obj
=
{
sort
:
'
profitPerMonthDrawDown
'
,
alocatedReserve
:
3
,
alocatedReserveCompound
:
3
,
risk
:
0
,
start
:
10000
,
pfTrade
:
2
,
side
:
'
both
'
,
riskFreeLevel
:
100
,
onlyShortLong
:
false
,
loss
:
0
,
level
:
200
,
dur
:
1500
,
maxTradeDays
:
40
,
targetPercentage
:{
enable
:
true
},
fft
:
1
,
fftPercent
:
-
2
,
fftRunup
:
2
,
fftPercentRunup
:{
count
:
7
,
percent
:
15
},
fftDiffDrawDownProfit
:
-
0.5
,
fftDrawDown
:
-
1
,
ddPlusRunCount
:
4
,
ddPlusRunPercent
:
-
2
,
ProfitZeroRunupProfit
:(
n
*-
1
),
ProfitZeroRunupDrawDown
:(
n
*-
1
),
usage
:
'
ProfitZeroRunupProfit
'
}
let
obj
=
{
sort
:
'
profitPerMonthDrawDown
'
,
alocatedReserve
:
3
,
alocatedReserveCompound
:
3
,
risk
:
0
,
start
:
10000
,
pfTrade
:
2
,
side
:
'
both
'
,
riskFreeLevel
:
100
,
onlyShortLong
:
false
,
loss
:
0
,
level
:
200
,
dur
:
1500
,
maxTradeDays
:
40
,
targetPercentage
:{
enable
:
true
},
fft
:
1
,
fftPercent
:
-
2
,
fftRunup
:
2
,
fftPercentRunup
:{
count
:
7
,
percent
:
15
},
fftDiffDrawDownProfit
:
-
0.5
,
fftDrawDown
:
-
1
,
ddPlusRunCount
:
4
,
ddPlusRunPercent
:
-
2
,
ProfitZeroRunupProfit
:(
n
*-
1
),
ProfitZeroRunupDrawDown
:(
n
*-
1
),
usage
:
'
ProfitZeroRunupProfit
'
}
// let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
// let detail=['configs2.json-211021092159_O1_BNC_BTCUSD_Lp1_Y211020a - Copy_Mn.csv&zarib param:1.1 base:200 target:1']
obj
.
detail
=
[]
obj
.
detail
=
[]
let
all
=
[]
// let all=[]
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
// for (let i=0;i<arr.length;i++)
all
.
push
(
add
(
arr
[
i
]))
// all.push(add(arr[i]))
//
let
arrz
=
await
Promise
.
all
(
all
)
// let arrz= await Promise.all(all)
let
arr2
=
[]
// let arr2 = []
for
(
let
i
=
0
;
i
<
arrz
.
length
;
i
++
)
{
// for (let i = 0; i < arrz.length; i++) {
let
inline
=
arrz
[
i
]
// let inline = arrz[i]
for
(
let
j
=
0
;
j
<
inline
.
length
;
j
++
)
// for (let j = 0; j < inline.length; j++)
arr2
.
push
(
inline
[
j
])
// arr2.push(inline[j])
}
// }
obj
.
data
=
arr2
obj
.
data
=
[{
"
type
"
:
"
dynamic
"
,
"
commision
"
:
0.001
,
"
base
"
:
100
,
"
target
"
:
1
,
"
param
"
:
"
1.0
"
}]
createfile
(
JSON
.
stringify
(
obj
,
null
,
2
),
obj
.
usage
+
n
)
createfile
(
JSON
.
stringify
(
obj
,
null
,
2
),
obj
.
usage
+
n
)
}
}
...
...
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