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
6a0dc99b
Commit
6a0dc99b
authored
Jul 24, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pull
parent
8012cf6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
grab2.js
grab2.js
+30
-25
No files found.
grab2.js
View file @
6a0dc99b
...
@@ -28,32 +28,7 @@ async function init() {
...
@@ -28,32 +28,7 @@ async function init() {
let
com
=
await
fs
.
readFileSync
(
'
com.json
'
,
'
utf8
'
);
let
com
=
await
fs
.
readFileSync
(
'
com.json
'
,
'
utf8
'
);
com
=
JSON
.
parse
(
com
)
com
=
JSON
.
parse
(
com
)
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
com
[
i
].
platform
=
com
[
i
].
platform
.
toLowerCase
()
let
t
=
com
[
i
].
platform
t
=
t
.
split
(
'
_
'
)
let
pair
=
t
[
3
].
replace
(
'
usdt
'
,
''
).
replace
(
'
usd
'
,
''
)
let
lp
=
t
[
4
].
replace
(
'
lp
'
,
'
Lp
'
)
com
[
i
].
lp
=
lp
let
p
=
t
[
t
.
length
-
1
].
split
(
'
.
'
)
p
=
p
[
0
].
split
(
pair
)[
0
]
let
uniq
=
pair
+
lp
+
p
+
capital
(
com
[
i
].
type
.
split
(
'
'
)[
5
])
+
parseFloat
(
com
[
i
].
type
.
split
(
'
'
)[
6
])
*
-
10
com
[
i
].
uniq
=
uniq
+
'
_
'
+
com
[
i
].
avgRunup
+
'
_
'
+
com
[
i
].
avgDrawdown
+
'
_
'
+
com
[
i
].
type
.
split
(
'
'
)[
5
]
+
'
_
'
+
(
parseFloat
(
com
[
i
].
type
.
split
(
'
'
)[
6
])
*
-
1
)
}
com
=
_
.
uniqBy
(
com
,
'
lp
'
);
let
newCom
=
[]
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
newCom
.
push
(
com
[
i
])
}
com
=
newCom
createComResfileADV
(
JSON
.
stringify
(
com
,
null
,
2
))
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
...
@@ -76,18 +51,21 @@ async function init() {
...
@@ -76,18 +51,21 @@ async function init() {
struc
=
indicator2Temp
struc
=
indicator2Temp
struc
=
struc
.
replace
(
'
ahmadTimeframe
'
,
f
.
timeframe
).
replace
(
'
ahmadnAtrPeriod
'
,
f
.
nAtrPeriod
).
replace
(
'
ahmaddAtrMultiplier
'
,
f
.
dAtrMultiplier
).
replace
(
'
ahmadlp
'
,
f
.
lp
)
struc
=
struc
.
replace
(
'
ahmadTimeframe
'
,
f
.
timeframe
).
replace
(
'
ahmadnAtrPeriod
'
,
f
.
nAtrPeriod
).
replace
(
'
ahmaddAtrMultiplier
'
,
f
.
dAtrMultiplier
).
replace
(
'
ahmadlp
'
,
f
.
lp
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nAtrPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dAtrMultiplier
)
+
'
&
'
+
f
.
lp
,
struc
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nAtrPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dAtrMultiplier
)
+
'
&
'
+
f
.
lp
,
struc
)
com
[
i
].
lp
=
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nAtrPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dAtrMultiplier
)
+
'
&
'
+
f
.
lp
}
}
if
(
indicator
===
3
)
if
(
indicator
===
3
)
{
{
struc
=
indicator3Temp
struc
=
indicator3Temp
struc
=
struc
.
replace
(
'
ahmadTimeframe
'
,
f
.
timeframe
).
replace
(
'
ahmadnStochPeriod
'
,
f
.
nStochPeriod
).
replace
(
'
ahmadnStochSmoothingPeriod
'
,
f
.
nStochSmoothingPeriod
).
replace
(
'
ahmaddOttPercent
'
,
f
.
dOttPercent
).
replace
(
'
ahmadnOttPeriod
'
,
f
.
lp
)
struc
=
struc
.
replace
(
'
ahmadTimeframe
'
,
f
.
timeframe
).
replace
(
'
ahmadnStochPeriod
'
,
f
.
nStochPeriod
).
replace
(
'
ahmadnStochSmoothingPeriod
'
,
f
.
nStochSmoothingPeriod
).
replace
(
'
ahmaddOttPercent
'
,
f
.
dOttPercent
).
replace
(
'
ahmadnOttPeriod
'
,
f
.
lp
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nStochPeriod
)
+
'
&
'
+
parseFloat
(
f
.
nStochSmoothingPeriod
)
+
'
&
'
+
f
.
lp
,
struc
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nStochPeriod
)
+
'
&
'
+
parseFloat
(
f
.
nStochSmoothingPeriod
)
+
'
&
'
+
f
.
lp
,
struc
)
com
[
i
].
lp
=
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nStochPeriod
)
+
'
&
'
+
parseFloat
(
f
.
nStochSmoothingPeriod
)
+
'
&
'
+
f
.
lp
}
}
if
(
indicator
===
4
)
if
(
indicator
===
4
)
{
{
struc
=
indicator4
struc
=
indicator4
struc
=
struc
.
replace
(
'
ahmadstMnMaBarAge
'
,
f
.
timeframe
).
replace
(
'
ahmadMnKeltner_nMidLnMaPeriod
'
,
f
.
nMidLnMaPeriod
).
replace
(
'
ahmadMnKeltner_dMultiplier
'
,
f
.
dMultiplier
).
replace
(
'
ahmadMnKeltner_nBandsAtrPeriod
'
,
f
.
lp
)
struc
=
struc
.
replace
(
'
ahmadstMnMaBarAge
'
,
f
.
timeframe
).
replace
(
'
ahmadMnKeltner_nMidLnMaPeriod
'
,
f
.
nMidLnMaPeriod
).
replace
(
'
ahmadMnKeltner_dMultiplier
'
,
f
.
dMultiplier
).
replace
(
'
ahmadMnKeltner_nBandsAtrPeriod
'
,
f
.
lp
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nMidLnMaPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dMultiplier
)
+
'
&
'
+
f
.
lp
,
struc
)
createConfigYashilADV
(
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nMidLnMaPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dMultiplier
)
+
'
&
'
+
f
.
lp
,
struc
)
com
[
i
].
lp
=
'
btc
'
+
indicator
+
'
&
'
+
parseFloat
(
f
.
nMidLnMaPeriod
)
+
'
&
'
+
parseFloat
(
f
.
dMultiplier
)
+
'
&
'
+
f
.
lp
}
}
...
@@ -98,6 +76,33 @@ async function init() {
...
@@ -98,6 +76,33 @@ async function init() {
}
}
arr
=
_
.
uniqBy
(
arr
,
'
name
'
);
arr
=
_
.
uniqBy
(
arr
,
'
name
'
);
createfinalADV
(
JSON
.
stringify
(
arr
,
null
,
2
))
createfinalADV
(
JSON
.
stringify
(
arr
,
null
,
2
))
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
com
[
i
].
platform
=
com
[
i
].
platform
.
toLowerCase
()
let
t
=
com
[
i
].
platform
t
=
t
.
split
(
'
_
'
)
let
pair
=
t
[
3
].
replace
(
'
usdt
'
,
''
).
replace
(
'
usd
'
,
''
)
// let lp = t[4].replace('lp', 'Lp')
// com[i].lp = lp
let
p
=
t
[
t
.
length
-
1
].
split
(
'
.
'
)
p
=
p
[
0
].
split
(
pair
)[
0
]
let
uniq
=
pair
+
com
[
i
].
lp
+
p
+
capital
(
com
[
i
].
type
.
split
(
'
'
)[
5
])
+
parseFloat
(
com
[
i
].
type
.
split
(
'
'
)[
6
])
*
-
10
com
[
i
].
uniq
=
uniq
+
'
_
'
+
com
[
i
].
avgRunup
+
'
_
'
+
com
[
i
].
avgDrawdown
+
'
_
'
+
com
[
i
].
type
.
split
(
'
'
)[
5
]
+
'
_
'
+
(
parseFloat
(
com
[
i
].
type
.
split
(
'
'
)[
6
])
*
-
1
)
}
com
=
_
.
uniqBy
(
com
,
'
lp
'
);
let
newCom
=
[]
for
(
let
i
=
0
;
i
<
com
.
length
;
i
++
)
{
newCom
.
push
(
com
[
i
])
}
com
=
newCom
createComResfileADV
(
JSON
.
stringify
(
com
,
null
,
2
))
// console.log(arr)
// console.log(arr)
...
...
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