Skip to content

Commit

Permalink
Adjust tpsl
Browse files Browse the repository at this point in the history
  • Loading branch information
djkazic committed Nov 11, 2023
1 parent 00ac98e commit 5fd41a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async function loadModules() {
runningPositions.forEach((position) => {
if (position.side === "s") {
totalSellExposure += position.quantity;
if (position.pl > 14) {
if (position.pl > 20) {
logger(
"finance-profit",
`CLOSING SHORT POSITION ${JSON.stringify(position)}`
Expand All @@ -263,7 +263,7 @@ async function loadModules() {
`Closed profitable short on LNM: fee ${position.opening_fee}, price ${position.price}, pl ${position.pl}`
);
changedPos = true;
} else if (position.pl < -20) {
} else if (position.pl < -19) {
logger(
"error",
`CLOSING SHORT POSITION AT LOSS ${JSON.stringify(position)}`
Expand All @@ -276,7 +276,7 @@ async function loadModules() {
}
} else if (position.side === "b") {
totalBuyExposure += position.quantity;
if (position.pl > 14) {
if (position.pl > 20) {
logger(
"finance-profit",
`CLOSING LONG POSITION ${JSON.stringify(position)}`
Expand All @@ -287,7 +287,7 @@ async function loadModules() {
`Closed profitable long on LNM: fee ${position.opening_fee}, price ${position.price}, pl ${position.pl}`
);
changedPos = true;
} else if (position.pl < -20) {
} else if (position.pl < -19) {
logger(
"error",
`CLOSING LONG POSITION AT LOSS ${JSON.stringify(position)}`
Expand Down

0 comments on commit 5fd41a2

Please sign in to comment.