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
b4d23a70
Commit
b4d23a70
authored
May 19, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pu
parent
40ed8e0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
33 deletions
+10
-33
change.js
change.js
+3
-3
test_json.js
test_json.js
+7
-30
No files found.
change.js
View file @
b4d23a70
...
@@ -51,9 +51,9 @@ function grabData(data) {
...
@@ -51,9 +51,9 @@ function grabData(data) {
try
{
try
{
let
d
=
data
[
i
].
split
(
'
,
'
)
let
d
=
data
[
i
].
split
(
'
,
'
)
let
profit
=
parseFloat
(
d
[
7
])
let
profit
=
parseFloat
(
d
[
31
])
let
runUp
=
parseFloat
(
d
[
8
])
let
runUp
=
parseFloat
(
d
[
34
])
let
drawDown
=
parseFloat
(
d
[
9
])
let
drawDown
=
parseFloat
(
d
[
35
])
if
(
isNaN
(
profit
))
if
(
isNaN
(
profit
))
continue
continue
...
...
test_json.js
View file @
b4d23a70
let
fs
=
require
(
'
fs
'
)
let
t
=
'
1,2022.01.01 00:12:00.000,Sell,0.01,ETHUSDT,3691.45,0.00,0.00,3696.44,2022.01.01 00:22:00.000,-499,-4.99,"s1g0_B_PrfFr-5.22_To5.62_xOpp",1,000 00:10:00.000,600000,-499,-4.99,637765927200000000,637765933200000000,562,-522,3691.45,3696.44,1,9999.12.31 23:59:59.999,3155378975999999999,0.00,0.00,1,1,-0.14,5.6200,-5.2200,0.15,-0.14
'
let
size
=
0
let
t2
=
'
RowNum,Open_Time,Type,Lots,Symbol,Open_Price,SL,TP,Close_Price,Close_Time,ProfitPips,ProfitUsd,Comment,MagicNum,Age_Dhhmmssfff,AgeMsec,TotPrfPips,TotPrfUsd,Open_Time_Ticks,Close_Time_Ticks,nAgeHiPrfPips,nAgeLoPrfPips,InvOpPrice,InvClPrice,Ticket,Expiration_Time,Expiration_Time_Ticks,Commission,Swap,nOmNum,nMyMagCode1,dPrfPipWrtOpPrPc,dAgeHiPrfUsd,dAgeLoPrfUsd,dAgeHiPrfInPrPc_RunUpPc,dAgeLoPrfInPrPc_DrawDownPc
'
run
()
async
function
run
()
{
let
arr
=
[]
arr
.
push
(
make
(
'
test.txt
'
))
await
Promise
.
all
(
arr
)
await
sleep
(
50
)
return
run
()
}
async
function
make
(
name
)
console
.
log
(
t
.
split
(
'
,
'
))
{
let
stats
=
await
fs
.
statSync
(
name
)
if
(
size
===
0
)
{
size
=
stats
.
size
return
}
if
(
size
!==
stats
.
size
)
t2
=
t2
.
split
(
'
,
'
)
{
console
.
log
(
t2
)
console
.
log
(
'
file changes
'
)
size
=
stats
.
size
}
for
(
let
i
=
0
;
i
<
t2
.
length
;
i
++
)
}
console
.
log
(
i
,
t2
[
i
])
\ No newline at end of file
async
function
sleep
(
millis
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
millis
));
}
\ No newline at end of file
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