Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
forex
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
forex
Commits
b569bd06
Commit
b569bd06
authored
Dec 08, 2021
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
69c4141a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ai.js
ai.js
+5
-1
No files found.
ai.js
View file @
b569bd06
...
@@ -10,6 +10,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
...
@@ -10,6 +10,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
let
commision
=
config
.
commision
let
commision
=
config
.
commision
let
money
=
config
.
base
let
money
=
config
.
base
let
total
=
0
let
total
=
0
let
allTotal
=
0
let
maxReserve
=
0
let
maxReserve
=
0
let
maxAllocatedMoney
=
0
let
maxAllocatedMoney
=
0
let
maxLevel
=
0
let
maxLevel
=
0
...
@@ -65,6 +66,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
...
@@ -65,6 +66,8 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
profit
=
0
profit
=
0
lastCom
=
0
lastCom
=
0
lastMoney
=
0
lastMoney
=
0
allTotal
++
if
(
!
d
.
riskFree
)
total
++
total
++
}
else
{
}
else
{
...
@@ -141,6 +144,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
...
@@ -141,6 +144,7 @@ function run(data, config, risk, pfTrade, riskFreeLevel) {
platform
:
data
[
0
].
signal
,
platform
:
data
[
0
].
signal
,
type
:
config
.
type
+
'
param:
'
+
config
.
param
+
'
base:
'
+
config
.
base
+
'
target:
'
+
config
.
target
,
type
:
config
.
type
+
'
param:
'
+
config
.
param
+
'
base:
'
+
config
.
base
+
'
target:
'
+
config
.
target
,
total
:
total
,
total
:
total
,
allTotal
:
allTotal
,
avgLevel
:
maxLevel
/
total
,
avgLevel
:
maxLevel
/
total
,
maxLevel
:
maxLevel
,
maxLevel
:
maxLevel
,
dur
:
dur
,
dur
:
dur
,
...
@@ -219,7 +223,7 @@ function inlineCheck(money, com, data, profit, lastCom, tar,riskFree) {
...
@@ -219,7 +223,7 @@ function inlineCheck(money, com, data, profit, lastCom, tar,riskFree) {
if
(
percentage
(
money
,
data
.
runUp
)
>
target
)
if
(
percentage
(
money
,
data
.
runUp
)
>
target
)
return
{
done
:
true
,
reserve
:
diff
}
return
{
done
:
true
,
reserve
:
diff
,
riskFree
}
else
else
return
{
done
:
false
,
reserve
:
diff
,
profit
:
profitMoney
,
com
:
com
,
lastMoney
:
money
}
return
{
done
:
false
,
reserve
:
diff
,
profit
:
profitMoney
,
com
:
com
,
lastMoney
:
money
}
...
...
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