Merge pull request #246 from HojouFotytu/develop

Develop
This commit is contained in:
HojouFotytu 2021-02-06 00:30:34 +09:00 committed by GitHub
commit 90af411201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -391,7 +391,7 @@ namespace Core.MarketAnalyzer
if (marketTrendChanges != null && marketTrendChanges.Count > 0)
{
double totalTrendChange = 0;
int trendChangeCount = marketTrendChanges.Count;
int trendsCount = marketTrendChanges.Count;
foreach (MarketTrendChange marketTrendChange in marketTrendChanges)
{
if (marketTrend.TrendThreshold != 0)
@ -399,7 +399,7 @@ namespace Core.MarketAnalyzer
if ((marketTrendChange.TrendChange > marketTrend.TrendThreshold) || (marketTrendChange.TrendChange < (marketTrend.TrendThreshold * -1)))
{
log.DoLogInfo("Market trend '" + marketTrend.Name + "' is ignoring " + marketTrendChange.Market + " for exceeding TrendThreshold.");
trendChangeCount += -1;
trendsCount += -1;
}
else
{
@ -411,7 +411,7 @@ namespace Core.MarketAnalyzer
totalTrendChange += marketTrendChange.TrendChange;
}
}
double averageTrendChange = totalTrendChange / trendChangeCount;
double averageTrendChange = totalTrendChange / trendsCount;
result.Add(marketTrend.Name, averageTrendChange);
log.DoLogInfo("Built average market trend change '" + marketTrend.Name + "' (" + averageTrendChange.ToString("#,#0.00") + "% in " + marketTrend.TrendMinutes.ToString() + " minutes) for " + marketTrendChanges.Count.ToString() + " markets.");
}

View File

@ -16,7 +16,7 @@
string iconColor = "text-success";
string ptMagicHealthIcon = "fa-heartbeat";
string ptMagicHealthTooltip = "PT Magic is alive and healthy! <br> Time elapsed since last run:"+ lastRuntime;
string ptMagicHealthTooltip = "PT Magic is alive and healthy! Time elapsed since last run:" + Math.Round(elapsedSecondsSinceRuntime / 60, 1) + " mins.";
if (elapsedSecondsSinceRuntime > (intervalSeconds * 2)) {
ptMagicHealthIcon = "fa-exclamation-triangle";
ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs! Time elapsed since last run: " + Math.Round(elapsedSecondsSinceRuntime / 60, 1) + " mins.";