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
568be958
Commit
568be958
authored
May 24, 2022
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git pu
parent
68f8598b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
change.js
change.js
+6
-3
No files found.
change.js
View file @
568be958
...
...
@@ -161,9 +161,9 @@ async function updateVars(name) {
if
(
varUsage
<
allData
.
value
)
{
// console.log(allData.id +' '+'Try Add usage:'+allData.usage +' with current var '+varUsage +' and less than '+allData.value)
if
(
lastData
.
includes
(
'
Buy
'
))
sig
=
allData
.
id
+
'
Sell
'
sig
=
allData
.
id
+
'
_
Sell
'
else
sig
=
allData
.
id
+
'
Buy
'
sig
=
allData
.
id
+
'
_
Buy
'
adder
(
sig
,
0.01
,
data
.
closeTime
)
}
// console.log(name,vars)
...
...
@@ -277,9 +277,11 @@ async function closer(sig) {
async
function
adder
(
sig
,
qty
,
date
)
{
let
lastToken
=
sig
+
'
_
'
+
date
console
.
log
(
'
Add db and ex :
'
,
sig
)
if
(
sig
.
includes
(
'
Buy
'
))
{
let
d
=
await
exchange
.
createMarketOrder
(
'
ETHUSDT
'
,
'
Buy
'
,
qty
,
0
,
{
order_link_id
:
lastToken
})
console
.
log
(
'
Add Suc With id
'
,
d
.
id
,
sig
)
if
(
d
.
id
)
{
const
[
add
]
=
await
client
.
multi
()
...
...
@@ -288,6 +290,7 @@ async function adder(sig, qty, date) {
}
}
else
{
let
d
=
exchange
.
createMarketOrder
(
'
ETHUSDT
'
,
'
Sell
'
,
qty
,
0
,
{
order_link_id
:
lastToken
})
console
.
log
(
'
Add Suc With id
'
,
d
.
id
,
sig
)
if
(
d
.
id
)
{
const
[
add
]
=
await
client
.
multi
()
...
...
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