Skip to content

Commit

Permalink
Remove tick decision making and revert previous deltas
Browse files Browse the repository at this point in the history
  • Loading branch information
djkazic committed Nov 17, 2023
1 parent 18955d6 commit 051da60
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,12 @@ async function loadModules() {
logger("finance", `RSI_movAvg: ${movingAverageRSI}`);
logger(
"finance",
`RSI_mBuy: ${movingAverageRSI - 4}, RSI_mSell: ${
`RSI_mBuy: ${movingAverageRSI - 3}, RSI_mSell: ${
movingAverageRSI + 12
}`
);
adjustedSellRsiThreshold = movingAverageRSI + 12;
adjustedBuyRsiThreshold = movingAverageRSI - 4;
adjustedBuyRsiThreshold = movingAverageRSI - 3;
} else {
return;
}
Expand All @@ -377,8 +377,7 @@ async function loadModules() {
// Check for sell conditions
if (
rsi.value >= adjustedSellRsiThreshold &&
lastPrice > sellPriceThreshold &&
(lastTickDirection === "PlusTick" || lastTickDirection === "ZeroPlusTick")
lastPrice > sellPriceThreshold
) {
action = "sell";
logger(
Expand All @@ -394,8 +393,7 @@ async function loadModules() {
sendTelegramMessage(`Shorted on LNM at ${lastPrice}`);
} else if (
rsi.value <= adjustedBuyRsiThreshold &&
lastPrice < buyPriceThreshold &&
(lastTickDirection === "MinusTick" || lastTickDirection === "ZeroMinusTick")
lastPrice < buyPriceThreshold
) {
action = "buy";
logger(
Expand Down

0 comments on commit 051da60

Please sign in to comment.