Skip to content

Commit

Permalink
Merge pull request #22 from TeamWertarbyte/fix/hodl-coins-not-hodled
Browse files Browse the repository at this point in the history
Fix hodl coin ignored in evaluation
  • Loading branch information
saschb2b authored Jan 30, 2021
2 parents b540c96 + 25f70c7 commit 879e84b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ export default class Bot {

for (const marketSymbol of marketSymbols) {
let decision: MarketDecision = 'NONE';
const currencySymbol = marketSymbol.split('-')[0];

if (this.config.HODL.includes(marketSymbol)) {
if (this.config.HODL.includes(currencySymbol)) {
decision = 'HODL';
} else {
const candles: Candle[] = await this.api.getCandles(
Expand All @@ -312,8 +313,7 @@ export default class Bot {
this.calculateEMA(candles)
);
const balance = balances.find(
({ currencySymbol }) =>
currencySymbol === marketSymbol.split('-')[0]
(balance) => balance.currencySymbol === currencySymbol
);

await this.evaluateMarket(
Expand Down

0 comments on commit 879e84b

Please sign in to comment.