Skip to content

Commit

Permalink
Merge pull request #71 from WorkDarwin/patch-10
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott-778 authored Mar 15, 2022
2 parents 45e02ea + 57b960f commit 4f404a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmcBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async function checkForProfit(token) {
token.currentValue = currentValue;
const takeProfit = (parseFloat(ethers.utils.formatUnits(token.intitialValue)) * (token.profitPercent + token.tokenSellTax) / 100 + parseFloat(ethers.utils.formatUnits(token.intitialValue))).toFixed(8).toString();
const profitDesired = ethers.utils.parseUnits(takeProfit);
let targetValueToSetNewStopLoss = ethers.utils.parseUnits((parseFloat(ethers.utils.formatUnits(token.newValue)) * (token.trailingStopLossPercent / 100 + token.tokenSellTax / 100) + parseFloat(ethers.utils.formatUnits(token.newValue))).toFixed(8).toString());
let targetValueToSetNewStopLoss = ethers.utils.parseUnits((parseFloat(ethers.utils.formatUnits(token.newValue)) * (token.trailingStopLossPercent / 100) + parseFloat(ethers.utils.formatUnits(token.newValue))).toFixed(8).toString());
console.log("\u001b[38;5;81m" + "Target value for trailing StopLoss:", ethers.utils.formatUnits(targetValueToSetNewStopLoss), "\u001b[0m");
let stopLoss = token.stopLoss;

Expand Down

0 comments on commit 4f404a3

Please sign in to comment.