Merge pull request #108 from HojouFotytu/develop
Gui Tweaks and more OFFSETPERCENT integer fixes
This commit is contained in:
commit
6fb3fa759f
|
@ -74,7 +74,13 @@ namespace Core.ProfitTrailer
|
|||
double oldValueOffset = (oldValue * (offsetValuePercent / 100));
|
||||
|
||||
// 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
|
||||
result = ((int)(Math.Round((oldValue + oldValueOffset), MidpointRounding.AwayFromZero) + .5)).ToString(new System.Globalization.CultureInfo("en-US"));
|
||||
|
|
|
@ -140,6 +140,15 @@ namespace Core.ProfitTrailer
|
|||
case "max cost reached":
|
||||
result = "COST";
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace Monitor.Pages
|
|||
if (PTData.SellLog.Count > 0)
|
||||
{
|
||||
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;
|
||||
|
||||
int tradeDayIndex = 0;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<!-- End Logo container-->
|
||||
|
||||
<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 class="menu-item list-inline-item">
|
||||
<!-- Mobile menu toggle-->
|
||||
|
|
|
@ -93,10 +93,9 @@
|
|||
<tr>
|
||||
<th>Market</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 data-toggle="tooltip" data-placement="top" title="Active buy strategies">Buy Strats</th>
|
||||
<th 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></th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Active buy strategies">DCA Buy Strats</th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Active sell strategies">Sell Strats</th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Current Profit">Profit</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@ -162,7 +161,7 @@
|
|||
@dcaLogEntry.BoughtTimes;
|
||||
}
|
||||
} 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>
|
||||
|
||||
|
@ -172,12 +171,7 @@
|
|||
<td>@Html.Raw(buyStrategyText)</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)
|
||||
{
|
||||
|
@ -188,7 +182,7 @@
|
|||
<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>
|
||||
}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue