Merge pull request #108 from HojouFotytu/develop

Gui Tweaks and more OFFSETPERCENT integer fixes
This commit is contained in:
HojouFotytu 2019-03-22 23:28:07 +09:00 committed by GitHub
commit 6fb3fa759f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 15 deletions

View File

@ -74,7 +74,13 @@ namespace Core.ProfitTrailer
double oldValueOffset = (oldValue * (offsetValuePercent / 100)); double oldValueOffset = (oldValue * (offsetValuePercent / 100));
// Use integers for timeout and pairs properties, otherwise double // Use integers for timeout and pairs properties, otherwise double
if (configPropertyKey.Contains("rebuy_timeout", StringComparison.InvariantCultureIgnoreCase) || configPropertyKey.Contains("trading_pairs", StringComparison.InvariantCultureIgnoreCase)) if (configPropertyKey.Contains("timeout", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("trading_pairs", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("buy_volume", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("listed_days", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("orderbook_depth", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("rebuy_count", StringComparison.InvariantCultureIgnoreCase)
|| configPropertyKey.Contains("buy_volume", StringComparison.InvariantCultureIgnoreCase))
{ {
// Ensure some values are rounded up to integers for PT comaptability // Ensure some values are rounded up to integers for PT comaptability
result = ((int)(Math.Round((oldValue + oldValueOffset), MidpointRounding.AwayFromZero) + .5)).ToString(new System.Globalization.CultureInfo("en-US")); result = ((int)(Math.Round((oldValue + oldValueOffset), MidpointRounding.AwayFromZero) + .5)).ToString(new System.Globalization.CultureInfo("en-US"));

View File

@ -140,6 +140,15 @@ namespace Core.ProfitTrailer
case "max cost reached": case "max cost reached":
result = "COST"; result = "COST";
break; break;
case "rebuy timeout":
result = "TIMEOUT";
break;
case "min/max change perc":
result = "MIN/MAX";
break;
case "buy value below dust":
result = "MIN DUST";
break;
default: default:
break; break;
} }

View File

@ -58,7 +58,7 @@ namespace Monitor.Pages
if (PTData.SellLog.Count > 0) if (PTData.SellLog.Count > 0)
{ {
MinSellLogDate = PTData.SellLog.OrderBy(sl => sl.SoldDate).First().SoldDate.Date; MinSellLogDate = PTData.SellLog.OrderBy(sl => sl.SoldDate).First().SoldDate.Date;
DateTime graphStartDate = DateTimeNow.DateTime.Date.AddDays(-30); DateTime graphStartDate = DateTimeNow.DateTime.Date.AddDays(-1850);
if (MinSellLogDate > graphStartDate) graphStartDate = MinSellLogDate; if (MinSellLogDate > graphStartDate) graphStartDate = MinSellLogDate;
int tradeDayIndex = 0; int tradeDayIndex = 0;

View File

@ -41,7 +41,7 @@
<!-- End Logo container--> <!-- End Logo container-->
<div class="menu-extras topbar-custom"> <div class="menu-extras topbar-custom">
<ul class="list-inline float-right mb-0"> <ul class="list-inline float-left mb-0">
<li id="ticker-widgets" class="list-inline-item ticker-widgets"></li> <li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
<li class="menu-item list-inline-item"> <li class="menu-item list-inline-item">
<!-- Mobile menu toggle--> <!-- Mobile menu toggle-->

View File

@ -93,10 +93,9 @@
<tr> <tr>
<th>Market</th> <th>Market</th>
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Total Bag Value">Value</th> <th class="text-left" data-toggle="tooltip" data-placement="top" title="Total Bag Value">Value</th>
<th class="text-right" data-toggle="tooltip" data-placement="top" title="Current DCA level">DCA</th> <th></th>
<th data-toggle="tooltip" data-placement="top" title="Active buy strategies">Buy Strats</th> <th class="text-left" data-toggle="tooltip" data-placement="top" title="Active buy strategies">DCA Buy Strats</th>
<th data-toggle="tooltip" data-placement="top" title="Active sell strategies">Sell Strats</th> <th class="text-left" data-toggle="tooltip" data-placement="top" title="Active sell strategies">Sell Strats</th>
<th class="text-right" data-toggle="tooltip" data-placement="top" title=""></th>
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Current Profit">Profit</th> <th class="text-left" data-toggle="tooltip" data-placement="top" title="Current Profit">Profit</th>
<th></th> <th></th>
</tr> </tr>
@ -162,7 +161,7 @@
@dcaLogEntry.BoughtTimes; @dcaLogEntry.BoughtTimes;
} }
} else { } else {
<span class="text-warning" data-toggle="tooltip" data-placement="top" title="DCA is disabled for this market!">Disabled!</span> <span data-toggle="tooltip" data-placement="top" title="DCA is disabled"><i class="fa fa-ban text-highlight"></i></span>
} }
</td> </td>
@ -172,12 +171,7 @@
<td>@Html.Raw(buyStrategyText)</td> <td>@Html.Raw(buyStrategyText)</td>
} }
<td>@Html.Raw(sellStrategyText)</td> <td>@Html.Raw(sellStrategyText)</td>
<td class="text-right">
@if (isTrailingSellActive) {
<i class="fa fa-flag-checkered text-success" data-toggle="tooltip" data-placement="top" title="Trailing sell active!"></i>
}
</td>
@if(!@lostValue) @if(!@lostValue)
{ {
@ -188,7 +182,7 @@
<td class="text-left">No Value!</td> <td class="text-left">No Value!</td>
} }
<td class="text-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/BagDetails/?m=@dcaLogEntry.Market" data-remote="false" data-toggle="modal" data-target="#dca-chart" class="btn btn-mini btn-ptmagic"><i class="fa fa-plus"></i></a></td> <td class="text-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/BagDetails/?m=@dcaLogEntry.Market" data-remote="false" data-toggle="modal" data-target="#dca-chart"><i class="fa fa-plus-circle"></i></a></td>
</tr> </tr>
} }
</tbody> </tbody>