Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
M22arius494 committed Sep 2, 2023
1 parent a2a2749 commit db1092b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions CryptoSbmScanner/Intern/BarometerTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ private bool CalculatePriceBarometer(CryptoQuoteData quoteData, SortedList<strin
CryptoSymbol symbol = quoteData.SymbolList[i];
if (symbol.CandleList.TryGetValue(unixCandlePrev, out CryptoCandle candlePrev) && symbol.CandleList.TryGetValue(unixCandleLast, out CryptoCandle candleLast))
{
decimal perc;
decimal diff = candleLast.Close - candlePrev.Close;
if (!candlePrev.Close.Equals(0))
perc = 100m * (diff / candlePrev.Close);
else perc = 0;

sumPerc += perc;
coinsMatching++;
if (candlePrev != null && candleLast != null) // Er worden in kucoin null candles toegevoegd?
{
decimal perc;
decimal diff = candleLast.Close - candlePrev.Close;
if (!candlePrev.Close.Equals(0))
perc = 100m * (diff / candlePrev.Close);
else perc = 0;

sumPerc += perc;
coinsMatching++;
}
}
}

Expand Down

0 comments on commit db1092b

Please sign in to comment.