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
ff8f8e03
Commit
ff8f8e03
authored
May 14, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pu
parent
04ed7899
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35332 additions
and
39 deletions
+35332
-39
ai.js
ai.js
+0
-38
change.js
change.js
+1
-1
file.csv
file.csv
+35298
-0
file.js
file.js
+32
-0
a.txt
test_watch/a.txt
+1
-0
No files found.
ai.js
View file @
ff8f8e03
...
@@ -575,46 +575,8 @@ function run(data, config, risk,forceZero, pfTrade, riskFreeLevel, detail, loss,
...
@@ -575,46 +575,8 @@ function run(data, config, risk,forceZero, pfTrade, riskFreeLevel, detail, loss,
baseCompund
=
baseCompund
+
percentage2
(
baseCompund
,
data
[
i
].
profit
-
0.1
)
baseCompund
=
baseCompund
+
percentage2
(
baseCompund
,
data
[
i
].
profit
-
0.1
)
if
(
data
[
i
].
profit
<=
0.1
&&
forceZero
)
{
VarProfitRunupZeroDrawDown
=
0
VarProfitRunupZeroProfit
=
0
VarProfitRunupZeroProfitDrawDown
=
0
VarProfitRunupZeroProfitRunup
=
0
VarProfitRunupZeroRunupDrawDown
=
0
VarProfitDrawDownZeroDrawDown
=
0
VarProfitDrawDownZeroProfit
=
0
VarProfitDrawDownZeroProfitDrawDown
=
0
VarProfitDrawDownZeroProfitRunup
=
0
VarProfitDrawDownZeroRunupDrawDown
=
0
VarDrawDownZeroDrawDown
=
0
VarDrawDownnZeroProfit
=
0
VarDrawDownZeroProfitDrawDown
=
0
VarDrawDownZeroProfitRunup
=
0
VarDrawDownZeroRunupDrawDown
=
0
VarRunupZeroRunupDrawDown
=
0
VarRunupZeroProfit
=
0
VarRunupZeroProfitDrawDown
=
0
VarRunupZeroDrawDown
=
0
VarRunupZeroProfitRunup
=
0
drawDownPlusRunUpCount
=
0
drawDownPlusRunUpPercent
=
0
RunUpDrawDownAllLossProfit
=
0
RunupDrawDownDiffDrawdownProfitAll
=
0
runUpDrawDownZeroDrawDownPercent
=
0
VarDrawDownZeroProfit
=
0
allLossProfit
=
0
VarProfitZeroRunupProfit
=
0
VarProfitZeroRunupDrawDown
=
0
diffDrawdownProfitAll
=
0
countDrop
=
0
ProfitZeroDrawDownPercent
=
0
allLossProfitRunup
=
0
countDropRunup
=
0
}
if
(
data
[
i
].
profit
>
0.1
)
{
if
(
data
[
i
].
profit
>
0.1
)
{
tempMeta
=
0
tempMeta
=
0
...
...
change.js
View file @
ff8f8e03
var
watch
=
require
(
'
node-watch
'
);
var
watch
=
require
(
'
node-watch
'
);
watch
(
'
C:
\\
yMTa - 2
\\
Set
\\
AiTest
\\
New folder
'
,
{
filter
:
/
\.
csv$/
},
function
(
evt
,
name
)
{
watch
(
'
./test_watch
'
,
{
filter
:
/
\.
csv$/
},
function
(
evt
,
name
)
{
console
.
log
(
'
%s changed.
'
,
name
);
console
.
log
(
'
%s changed.
'
,
name
);
});
});
\ No newline at end of file
file.csv
0 → 100644
View file @
ff8f8e03
This diff is collapsed.
Click to expand it.
file.js
0 → 100644
View file @
ff8f8e03
const
fs
=
require
(
'
fs
'
);
run
()
async
function
run
()
{
let
files
=
await
fs
.
readFileSync
(
'
./file.csv
'
,
'
utf8
'
)
files
=
files
.
split
(
'
\n
'
)
try
{
await
fs
.
unlinkSync
(
'
./test_watch/file.csv
'
)
}
catch
(
e
)
{
}
// append(files[0])
// append(files[1])
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
append
(
files
[
i
])
await
sleep
(
3000
)
}
// console.log(files)
}
async
function
sleep
(
millis
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
millis
));
}
function
append
(
data
)
{
fs
.
appendFile
(
'
./test_watch/file.csv
'
,
data
,
function
(
err
)
{
if
(
err
)
throw
err
;
console
.
log
(
'
Saved!
'
);
});
}
\ No newline at end of file
test_watch/a.txt
0 → 100644
View file @
ff8f8e03
s
\ 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