Skip to content

Commit

Permalink
Adjust params to be more aggressive
Browse files Browse the repository at this point in the history
  • Loading branch information
djkazic committed Nov 18, 2023
1 parent 051da60 commit 19888d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function loadModules() {
let lastTradeLogicCall = 0;
let rsiData = [];
let lastTickDirection = '';
const period = 14;
const period = 15;
const tradeLogicCooldown = 60 * 1000;

const canMakeTrade = () => Date.now() - lastTradeTime > 1000;
Expand All @@ -110,7 +110,7 @@ async function loadModules() {
}

function addRsiSample(sample) {
if (rsiData.length > 14) {
if (rsiData.length > 15) {
// Remove the oldest sample to make room for the new one
rsiData.shift();
}
Expand Down Expand Up @@ -350,12 +350,12 @@ async function loadModules() {
logger("finance", `RSI_movAvg: ${movingAverageRSI}`);
logger(
"finance",
`RSI_mBuy: ${movingAverageRSI - 3}, RSI_mSell: ${
movingAverageRSI + 12
`RSI_mBuy: ${movingAverageRSI - 2}, RSI_mSell: ${
movingAverageRSI + 10
}`
);
adjustedSellRsiThreshold = movingAverageRSI + 12;
adjustedBuyRsiThreshold = movingAverageRSI - 3;
adjustedSellRsiThreshold = movingAverageRSI + 10;
adjustedBuyRsiThreshold = movingAverageRSI - 2;
} else {
return;
}
Expand Down

0 comments on commit 19888d2

Please sign in to comment.