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
24e31f39
Commit
24e31f39
authored
Apr 24, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pu
parent
2f7b1874
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ymta.js
ymta.js
+3
-3
No files found.
ymta.js
View file @
24e31f39
const
fs
=
require
(
'
fs
'
)
let
moment
=
require
(
'
moment-timezone
'
)
let
_
=
require
(
'
lodash
'
)
let
data
=
'
0,1,2,A2,ETHUSDT,43533.48,43533.46,2022.04.17 21:15:30.801,637858269308017885
,1,2,timeframe,pvtPeriod,atrFactor,atrPeriod,000 00:25:00.000,1,1.000,10,14,0.100,5,False,HiHi_LoLo,1.000,1.000,0.000
'
let
data
=
'
num
,1,2,timeframe,pvtPeriod,atrFactor,atrPeriod,000 00:25:00.000,1,1.000,10,14,0.100,5,False,HiHi_LoLo,1.000,1.000,0.000
'
init
()
...
...
@@ -14,11 +14,11 @@ async function init() {
let
res
=
await
fs
.
readFileSync
(
'
runres.json
'
,
'
utf8
'
);
res
=
JSON
.
parse
(
res
)
let
header
=
'
RowNum,
Om,TotOmNo,SigTypeStr,SymName,Ask,Bid,CurTimeY2f,CurTimeTicks,
nMnTrdMethodNum,nEntSignalCodeNum,PPST1_stMnBarAge,PPST1_PvtPtPeriod,PPST1_AtrFactor,PPST1_AtrPeriod,PPST2_stMnBarAge,PPST2_PvtPtPeriod,PPST2_AtrFactor,PPST2_AtrPeriod,3crm_nStopLoss_AtrPeriod,3crm_dStopLoss_AtrRiskAdjustmentCoef,3crm_nStopLoss_SwingLookbackBarNo,3crm_bUseTrailSl,enumTrailSlRef,dTrailSlAtrMultiplier,dTpSlRewardToRiskRatio,dRrToStartTrailSl
\n
'
let
header
=
'
RowNum,nMnTrdMethodNum,nEntSignalCodeNum,PPST1_stMnBarAge,PPST1_PvtPtPeriod,PPST1_AtrFactor,PPST1_AtrPeriod,PPST2_stMnBarAge,PPST2_PvtPtPeriod,PPST2_AtrFactor,PPST2_AtrPeriod,3crm_nStopLoss_AtrPeriod,3crm_dStopLoss_AtrRiskAdjustmentCoef,3crm_nStopLoss_SwingLookbackBarNo,3crm_bUseTrailSl,enumTrailSlRef,dTrailSlAtrMultiplier,dTpSlRewardToRiskRatio,dRrToStartTrailSl
\n
'
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
let
t
=
data
.
replace
(
'
timeframe
'
,
res
[
i
].
timeStamp
).
replace
(
'
pvtPeriod
'
,
res
[
i
].
pvtPeriod
).
replace
(
'
atrFactor
'
,
res
[
i
].
atrFactor
).
replace
(
'
atrPeriod
'
,
res
[
i
].
atrPeriod
)
let
t
=
data
.
replace
(
'
timeframe
'
,
res
[
i
].
timeStamp
).
replace
(
'
pvtPeriod
'
,
res
[
i
].
pvtPeriod
).
replace
(
'
atrFactor
'
,
res
[
i
].
atrFactor
).
replace
(
'
atrPeriod
'
,
res
[
i
].
atrPeriod
)
.
replace
(
'
num
'
,(
i
+
1
).
toString
())
if
(
i
!==
res
.
length
-
1
)
t
=
t
+
'
\n
'
header
=
header
+
t
...
...
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