commit
590d4334cb
|
@ -19,7 +19,6 @@
|
|||
</div>
|
||||
</div>
|
||||
} else {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card-box">
|
||||
|
@ -29,6 +28,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th data-fieldid="Market" data-tablesaw-sortable-col>Market</th>
|
||||
<th data-sortable-numeric="true" data-tablesaw-sortable-col data-fieldid="PercChange" data-toggle="tooltip" data-placement="top" title="24 hour market trend">Trend</th>
|
||||
<th data-sortable-numeric="true" data-fieldid="Amount" data-tablesaw-sortable-col>Amount</th>
|
||||
<th data-fieldid="TotalCost" data-tablesaw-sortable-col data-sortable-numeric="true" class="text-left" data-toggle="tooltip" data-placement="top" title="Spent total cost in @Model.Summary.MainMarket">Value</th>
|
||||
<th data-fieldid="BoughtTimes" data-tablesaw-sortable-col data-sortable-numeric="true" 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>
|
||||
|
@ -36,6 +37,7 @@
|
|||
<th class="text-right" data-toggle="tooltip" data-placement="top" title="Buy Strategy Trigger">BS Trigger</th>
|
||||
<th data-fieldid="ProfitPercent" data-tablesaw-sortable-col data-sortable-numeric="true" data-tablesaw-sortable-default-col class="text-right tablesaw-sortable-descending" data-toggle="tooltip" data-placement="top" title="Current profit percentage">Profit</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="Sell Strategy Value">SSV</th>
|
||||
<th class="text-right" data-toggle="tooltip" data-placement="top" title="Sell Strategy Trigger">SST</th>
|
||||
<th class="text-right" data-toggle="tooltip" data-placement="top" title="Current Bid Order & Average Purchase Price">Bid Price<br>Avg Price</th>
|
||||
<th></th>
|
||||
|
|
|
@ -28,10 +28,17 @@
|
|||
var errCountIndex = [];
|
||||
var intervalDashboardTop;
|
||||
var intervalDashboardBottom;
|
||||
|
||||
var loadDashboardTop = function () {
|
||||
$("#baglist-refresh-icon").html('<i class="fa fa-circle-o-notch fa-spin fa-fw" data-toggle="tooltip" data-placement="top" title="Loading fresh data..."></i>');
|
||||
$("#buylist-refresh-icon").html('<i class="fa fa-circle-o-notch fa-spin fa-fw" data-toggle="tooltip" data-placement="top" title="Loading fresh data..."></i>');
|
||||
|
||||
// Clear exisitng interval to stop multiple attempts to load at the same time.
|
||||
if (intervalDashboardTop != null)
|
||||
{
|
||||
clearInterval(intervalDashboardTop);
|
||||
}
|
||||
|
||||
$("#dashboardTop").load('@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/DashboardTop', '', function (responseText, textStatus, XMLHttpRequest) {
|
||||
$("#baglist-refresh-icon").html('');
|
||||
$("#buylist-refresh-icon").html('');
|
||||
|
@ -49,6 +56,9 @@
|
|||
} else {
|
||||
errCountIndex["DashboardTop"] = 0;
|
||||
}
|
||||
|
||||
// Reinstate interval
|
||||
intervalDashboardTop = setInterval(function () { loadDashboardTop(); }, 5 * 1000);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -62,6 +72,13 @@
|
|||
nv.logs = {};
|
||||
nv.tooltip = {};
|
||||
|
||||
// Clear exisitng interval to stop multiple attempts to load at the same time.
|
||||
if (intervalDashboardBottom != null)
|
||||
{
|
||||
clearInterval(intervalDashboardBottom);
|
||||
}
|
||||
|
||||
// Load dashboard
|
||||
$("#dashboardBottom").load('@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/DashboardBottom', '', function (responseText, textStatus, XMLHttpRequest) {
|
||||
if (textStatus == 'error') {
|
||||
errCountIndex["DashboardBottom"]++;
|
||||
|
@ -73,17 +90,18 @@
|
|||
} else {
|
||||
errCountIndex["DashboardBottom"] = 0;
|
||||
}
|
||||
|
||||
// Reinstate the interval.
|
||||
intervalDashboardBottom = setInterval(function () { loadDashboardBottom(); }, @Model.PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds * 1000);
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
errCountIndex["DashboardTop"] = 0;
|
||||
loadDashboardTop();
|
||||
intervalDashboardTop = setInterval(function () { loadDashboardTop(); }, 5 * 1000);
|
||||
loadDashboardTop();
|
||||
|
||||
errCountIndex["DashboardBottom"] = 0;
|
||||
loadDashboardBottom();
|
||||
intervalDashboardBottom = setInterval(function () { loadDashboardBottom(); }, @Model.PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds * 1000);
|
||||
});
|
||||
</script>
|
||||
}
|
|
@ -24,7 +24,7 @@
|
|||
<!-- Navigation Bar-->
|
||||
<header id="topnav">
|
||||
<div class="topbar-main">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid px-1">
|
||||
|
||||
<!-- Logo container-->
|
||||
<div class="logo">
|
||||
|
@ -43,6 +43,9 @@
|
|||
<div class="menu-extras topbar-custom">
|
||||
<ul class="list-inline float-left mb-0">
|
||||
<li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
|
||||
</ul>
|
||||
|
||||
<ul class="list-inline float-right pt-2">
|
||||
<li class="menu-item list-inline-item">
|
||||
<!-- Mobile menu toggle-->
|
||||
<a class="navbar-toggle nav-link">
|
||||
|
@ -54,8 +57,6 @@
|
|||
</a>
|
||||
<!-- End mobile menu toggle-->
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end menu-extras -->
|
||||
|
||||
|
@ -66,7 +67,7 @@
|
|||
<!-- end topbar-main -->
|
||||
|
||||
<div class="navbar-custom">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid px-1">
|
||||
<div id="navigation">
|
||||
<!-- Navigation Menu-->
|
||||
<ul class="navigation-menu">
|
||||
|
@ -127,7 +128,7 @@
|
|||
<!-- End Navigation Bar-->
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid px-1">
|
||||
|
||||
@RenderBody()
|
||||
|
||||
|
@ -171,6 +172,13 @@
|
|||
var errCount = [];
|
||||
var interval;
|
||||
var loadWidgets = function () {
|
||||
// Clear exisitng interval to stop multiple attempts to load at the same time.
|
||||
if (interval != null)
|
||||
{
|
||||
clearInterval(interval);
|
||||
}
|
||||
|
||||
// Load widgets
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$("#ticker-widgets").load('@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/TickerWidgets', '', function (responseText, textStatus, XMLHttpRequest) {
|
||||
if (textStatus == 'error') {
|
||||
|
@ -183,13 +191,15 @@
|
|||
} else {
|
||||
errCount["TickerWidgets"] = 0;
|
||||
}
|
||||
|
||||
// Reinstate the interval.
|
||||
interval = setInterval(function () { loadWidgets(); }, 5000);
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
errCount["TickerWidgets"] = 0;
|
||||
loadWidgets();
|
||||
interval = setInterval(function () { loadWidgets(); }, 5 * 1000);
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$('.text-autocolor').autocolor(false);
|
||||
|
|
|
@ -89,6 +89,12 @@
|
|||
<th class="align-top"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, dcaLogEntry.Market, Model.Summary.MainMarket)" target="_blank">@dcaLogEntry.Market</a> <i class="fa fa-exclamation-triangle text-highlight" data-toggle="tooltip" data-placement="top" data-html="true" title="@await Component.InvokeAsync("PairIcon", mps)" data-template="<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner pair-tooltip'></div></div>"></i></th>
|
||||
}
|
||||
|
||||
// Trend
|
||||
<td class="text-autocolor">@Html.Raw((dcaLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))%</td>
|
||||
|
||||
// Amount
|
||||
<td class="text-left">@Html.Raw(@dcaLogEntry.Amount)</td>
|
||||
|
||||
// Value
|
||||
<td class="text-left">@Html.Raw(@dcaLogEntry.TotalCost.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + " (" + Model.MainFiatCurrencySymbol + currentFiatValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + ")")</td>
|
||||
|
||||
|
@ -137,6 +143,9 @@
|
|||
// Sell Strats
|
||||
<td class="text-nowrap">@Html.Raw(sellStrategyText)</td>
|
||||
|
||||
// SSV
|
||||
<td class="text-right text-nowrap">@Html.Raw(currentSellValueText)</td>
|
||||
|
||||
// SST
|
||||
<td class="text-right text-nowrap">
|
||||
@Html.Raw(triggerSellValueText)
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card-box">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2">
|
||||
<h4 class="m-t-0 m-b-20 header-title"><b>Market Trends</b><small class="pull-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)MarketAnalyzer">more</a></small></h4>
|
||||
|
||||
<table class="table table-sm">
|
||||
|
@ -44,8 +44,8 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card-box">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2">
|
||||
<h4 class="m-t-0 m-b-20 header-title"><b>Sales Overview</b><small class="pull-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)SalesAnalyzer">more</a></small></h4>
|
||||
@{
|
||||
double totalProfit = Model.PTData.SellLog.Sum(s => s.Profit);
|
||||
|
@ -131,8 +131,8 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card-box" style="height:305px;">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2" style="height:305px;">
|
||||
@if (!Model.TrendChartDataJSON.Equals("")) {
|
||||
<div class="trend-chart">
|
||||
<svg style="height:305px;width:100%"></svg>
|
||||
|
@ -142,8 +142,8 @@
|
|||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card-box" style="height:305px;">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2" style="height:305px;">
|
||||
@if (!Model.ProfitChartDataJSON.Equals("")) {
|
||||
<div class="profit-chart">
|
||||
<svg style="height:305px;width:100%"></svg>
|
||||
|
|
|
@ -5,14 +5,15 @@
|
|||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card-box">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2">
|
||||
<h4 class="m-t-0 m-b-20 header-title"><b>Possible Buys (@Model.PTData.BuyLog.Count)</b><small id="buylist-refresh-icon"></small><small class="pull-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)BuyAnalyzer">more</a></small></h4>
|
||||
@if (Model.PTData.BuyLog.Count == 0) {
|
||||
|
||||
<p>Your Profit Trailer did not find anything worth buying so far.</p>
|
||||
|
||||
} else {
|
||||
|
||||
<table class="table table-sm m-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -79,8 +80,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card-box">
|
||||
<div class="col-md-6 px-1">
|
||||
<div class="card-box px-2">
|
||||
<h4 class="m-t-0 m-b-20 header-title"><b>Pairs & DCA (@Model.PTData.DCALog.Count)</b><small id="baglist-refresh-icon"></small><small class="pull-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)BagAnalyzer">more</a></small></h4>
|
||||
|
||||
@if (Model.PTData.DCALog.Count == 0) {
|
||||
|
@ -88,106 +89,107 @@
|
|||
<p>Your Profit Trailer did not buy anything so far that's worth analyzing.</p>
|
||||
|
||||
} else {
|
||||
|
||||
<table class="table table-sm m-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Market</th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Total Bag Value">Value</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>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in Model.PTData.DCALog.OrderByDescending(d => d.ProfitPercent).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries)) {
|
||||
// Loop through the pairs preparing the data for display
|
||||
Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null;
|
||||
if (Model.Summary.MarketSummary.ContainsKey(dcaLogEntry.Market)) {
|
||||
mps = Model.Summary.MarketSummary[dcaLogEntry.Market];
|
||||
}
|
||||
|
||||
bool dcaEnabled = true;
|
||||
if (mps != null) {
|
||||
dcaEnabled = mps.IsDCAEnabled;
|
||||
}
|
||||
|
||||
bool isTrailingBuyActive = dcaLogEntry.IsTrailing;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isTrailingBuyActive = (dcaLogEntry.BuyStrategies.FindAll(bs => bs.IsTrailing).Count > 0);
|
||||
}
|
||||
|
||||
bool isBuyStrategyTrue = dcaLogEntry.IsTrue;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isBuyStrategyTrue = (dcaLogEntry.BuyStrategies.FindAll(bs => !bs.IsTrue).Count == 0);
|
||||
}
|
||||
|
||||
bool isTrailingSellActive = false;
|
||||
if (dcaLogEntry.SellStrategies.Count > 0) {
|
||||
isTrailingSellActive = (dcaLogEntry.SellStrategies.FindAll(ss => ss.IsTrailing).Count > 0);
|
||||
}
|
||||
|
||||
bool isSellStrategyTrue = false;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isSellStrategyTrue = (dcaLogEntry.SellStrategies.FindAll(ss => !ss.IsTrue).Count == 0);
|
||||
}
|
||||
|
||||
bool buyDisabled = false;
|
||||
string buyStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.BuyStrategies, dcaLogEntry.BuyStrategy, isBuyStrategyTrue, isTrailingBuyActive);
|
||||
if (!Core.ProfitTrailer.StrategyHelper.IsValidStrategy(buyStrategyText, true)) {
|
||||
buyDisabled = true;
|
||||
}
|
||||
|
||||
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
||||
|
||||
// Check for when PT loses the value of a pair
|
||||
bool lostValue = false;
|
||||
lostValue = (dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0);
|
||||
|
||||
// Render the row
|
||||
<tr @(lostValue ? "class=errorRow" : "") >
|
||||
@if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) {
|
||||
<th class="align-top"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, dcaLogEntry.Market, Model.Summary.MainMarket)" target="_blank">@dcaLogEntry.Market</a></th>
|
||||
} else {
|
||||
<th class="align-top"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, dcaLogEntry.Market, Model.Summary.MainMarket)" target="_blank">@dcaLogEntry.Market</a> <i class="fa fa-exclamation-triangle text-highlight" data-toggle="tooltip" data-placement="top" data-html="true" title="@await Component.InvokeAsync("PairIcon", mps)" data-template="<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner pair-tooltip'></div></div>"></i></th>
|
||||
}
|
||||
|
||||
<td class="text-left">@Html.Raw(dcaLogEntry.TotalCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US")))</td>
|
||||
|
||||
<td class="text-right">
|
||||
@if (dcaEnabled) {
|
||||
@if (dcaLogEntry.BoughtTimes > 0) {
|
||||
@dcaLogEntry.BoughtTimes;
|
||||
}
|
||||
} else {
|
||||
<span data-toggle="tooltip" data-placement="top" title="DCA is disabled"><i class="fa fa-ban text-highlight"></i></span>
|
||||
}
|
||||
</td>
|
||||
|
||||
@if (buyDisabled) {
|
||||
<td>@Html.Raw(buyStrategyText)</td>
|
||||
} else {
|
||||
<td>@Html.Raw(buyStrategyText)</td>
|
||||
}
|
||||
<td>@Html.Raw(sellStrategyText)</td>
|
||||
|
||||
|
||||
@if(!@lostValue)
|
||||
{
|
||||
<td class="text-autocolor">@dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<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"><i class="fa fa-plus-circle"></i></a></td>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm m-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Market</th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Market trend last 24 hours">24H Trend</th>
|
||||
<th class="text-left" data-toggle="tooltip" data-placement="top" title="Total Bag Value">Value</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>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in Model.PTData.DCALog.OrderByDescending(d => d.ProfitPercent).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries)) {
|
||||
// Loop through the pairs preparing the data for display
|
||||
Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null;
|
||||
if (Model.Summary.MarketSummary.ContainsKey(dcaLogEntry.Market)) {
|
||||
mps = Model.Summary.MarketSummary[dcaLogEntry.Market];
|
||||
}
|
||||
|
||||
bool dcaEnabled = true;
|
||||
if (mps != null) {
|
||||
dcaEnabled = mps.IsDCAEnabled;
|
||||
}
|
||||
|
||||
bool isTrailingBuyActive = dcaLogEntry.IsTrailing;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isTrailingBuyActive = (dcaLogEntry.BuyStrategies.FindAll(bs => bs.IsTrailing).Count > 0);
|
||||
}
|
||||
|
||||
bool isBuyStrategyTrue = dcaLogEntry.IsTrue;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isBuyStrategyTrue = (dcaLogEntry.BuyStrategies.FindAll(bs => !bs.IsTrue).Count == 0);
|
||||
}
|
||||
|
||||
bool isTrailingSellActive = false;
|
||||
if (dcaLogEntry.SellStrategies.Count > 0) {
|
||||
isTrailingSellActive = (dcaLogEntry.SellStrategies.FindAll(ss => ss.IsTrailing).Count > 0);
|
||||
}
|
||||
|
||||
bool isSellStrategyTrue = false;
|
||||
if (dcaLogEntry.BuyStrategies.Count > 0) {
|
||||
isSellStrategyTrue = (dcaLogEntry.SellStrategies.FindAll(ss => !ss.IsTrue).Count == 0);
|
||||
}
|
||||
|
||||
bool buyDisabled = false;
|
||||
string buyStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.BuyStrategies, dcaLogEntry.BuyStrategy, isBuyStrategyTrue, isTrailingBuyActive);
|
||||
if (!Core.ProfitTrailer.StrategyHelper.IsValidStrategy(buyStrategyText, true)) {
|
||||
buyDisabled = true;
|
||||
}
|
||||
|
||||
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
||||
|
||||
// Check for when PT loses the value of a pair
|
||||
bool lostValue = false;
|
||||
lostValue = (dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0);
|
||||
|
||||
// Render the row
|
||||
<tr @(lostValue ? "class=errorRow" : "") >
|
||||
@if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) {
|
||||
<th class="align-top"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, dcaLogEntry.Market, Model.Summary.MainMarket)" target="_blank">@dcaLogEntry.Market</a></th>
|
||||
} else {
|
||||
<th class="align-top"><a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform,Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, dcaLogEntry.Market, Model.Summary.MainMarket)" target="_blank">@dcaLogEntry.Market</a> <i class="fa fa-exclamation-triangle text-highlight" data-toggle="tooltip" data-placement="top" data-html="true" title="@await Component.InvokeAsync("PairIcon", mps)" data-template="<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner pair-tooltip'></div></div>"></i></th>
|
||||
}
|
||||
|
||||
<td class="text-autocolor">@Html.Raw((dcaLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))%</td>
|
||||
|
||||
<td class="text-left">@Html.Raw(dcaLogEntry.TotalCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US")))</td>
|
||||
|
||||
<td class="text-right">
|
||||
@if (dcaEnabled) {
|
||||
@if (dcaLogEntry.BoughtTimes > 0) {
|
||||
@dcaLogEntry.BoughtTimes;
|
||||
}
|
||||
} else {
|
||||
<span data-toggle="tooltip" data-placement="top" title="DCA is disabled"><i class="fa fa-ban text-highlight"></i></span>
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>@Html.Raw(buyStrategyText)</td>
|
||||
|
||||
<td>@Html.Raw(sellStrategyText)</td>
|
||||
|
||||
@if(!@lostValue)
|
||||
{
|
||||
<td class="text-autocolor">@dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<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"><i class="fa fa-plus-circle"></i></a></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if (Model.PTData.DCALog.Count > Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries) {
|
||||
<p class="text-right"><small><i class="fa fa-info-circle"></i> @Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries of @Model.PTData.DCALog.Count items listed - <a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)BagAnalyzer">View all items</a></small></p>
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
singleSettingInfoIcon = "<i class=\"fa fa-info-circle text-muted\" data-toggle=\"tooltip\" data-placement=\"top\" data-html=\"true\" title=\"<b>Single Market Settings active for:</b><br />-" + Core.Helper.SystemHelper.ConvertListToTokenString(Model.MarketsWithSingleSettings, "<br />-", true) + "\" data-template=\"<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner tooltip-200 text-left'></div></div>\"></i>";
|
||||
}
|
||||
|
||||
double currentBalance = Model.PTData.GetCurrentBalance();
|
||||
string currentBalanceString = currentBalance.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
|
||||
if (currentBalance > 100) {
|
||||
currentBalanceString = Math.Round(currentBalance, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
||||
}
|
||||
|
||||
DateTime lastRuntime = Model.Summary.LastRuntime;
|
||||
double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds;
|
||||
double intervalSeconds = Model.PTMagicConfiguration.AnalyzerSettings.MarketAnalyzer.IntervalMinutes * 60.0;
|
||||
|
|
|
@ -20,8 +20,6 @@ namespace Monitor.Pages {
|
|||
}
|
||||
|
||||
private void BindData() {
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
|
||||
// Get markets with active single settings
|
||||
foreach (string key in Summary.MarketSummary.Keys) {
|
||||
if (Summary.MarketSummary[key].ActiveSingleSettings != null) {
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace Monitor._Internal
|
|||
PTMagicBasePath += Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
PTMagicConfiguration = new PTMagicConfiguration(PTMagicBasePath);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,14 +2,16 @@
|
|||
color: #33b5e5;
|
||||
}
|
||||
|
||||
a:hover, a:focus, a:active {
|
||||
color: #50cefc;
|
||||
}
|
||||
a:hover,
|
||||
a:focus,
|
||||
a:active {
|
||||
color: #50cefc;
|
||||
}
|
||||
|
||||
.logo > .logo-version {
|
||||
font-size: 12px;
|
||||
.logo>.logo-version {
|
||||
font-size : 12px;
|
||||
font-weight: normal;
|
||||
color: #33b5e5 !important;
|
||||
color : #33b5e5 !important;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
@ -22,7 +24,7 @@
|
|||
}
|
||||
|
||||
.pair-tooltip {
|
||||
min-width: 400px;
|
||||
min-width : 400px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
@ -43,47 +45,47 @@
|
|||
}
|
||||
|
||||
.btn-ptmagic {
|
||||
border: 1px solid #33b5e5 !important;
|
||||
border : 1px solid #33b5e5 !important;
|
||||
background: #33b5e5;
|
||||
color: #ffffff;
|
||||
color : #ffffff;
|
||||
}
|
||||
|
||||
.btn-ptmagic:hover {
|
||||
border: 1px solid #33b5e5 !important;
|
||||
background: #33b5e5 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.btn-ptmagic:hover {
|
||||
border : 1px solid #33b5e5 !important;
|
||||
background: #33b5e5 !important;
|
||||
color : #ffffff !important;
|
||||
}
|
||||
|
||||
.btn-custom.btn-ptmagic {
|
||||
color: #33b5e5;
|
||||
}
|
||||
|
||||
.btn-ptmagic.btn-mini {
|
||||
padding: .15rem .5rem;
|
||||
font-size: .475rem;
|
||||
line-height: 1.2;
|
||||
padding : .15rem .5rem;
|
||||
font-size : .475rem;
|
||||
line-height : 1.2;
|
||||
border-radius: .1rem;
|
||||
}
|
||||
|
||||
.btn-xs {
|
||||
line-height: 1.4;
|
||||
padding: 0.14286rem 0.5rem;
|
||||
font-size: 0.78571rem;
|
||||
padding : 0.14286rem 0.5rem;
|
||||
font-size : 0.78571rem;
|
||||
}
|
||||
|
||||
.ticker-widgets div {
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
display : inline-block;
|
||||
margin-top : 12px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ticker-widget {
|
||||
margin-top: 12px;
|
||||
margin-top : 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.card-box-mini {
|
||||
padding: 7px;
|
||||
padding : 7px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
|
@ -92,39 +94,52 @@
|
|||
}
|
||||
|
||||
.card-box-success-outlined {
|
||||
background: none;
|
||||
border: 1px solid #81c868;
|
||||
background : none;
|
||||
border : 1px solid #81c868;
|
||||
border-radius: 5px;
|
||||
color: #81c868;
|
||||
color : #81c868;
|
||||
}
|
||||
|
||||
.card-box-warning-outlined {
|
||||
background: none;
|
||||
border: 1px solid #ffbd4a;
|
||||
background : none;
|
||||
border : 1px solid #ffbd4a;
|
||||
border-radius: 5px;
|
||||
color: #ffbd4a;
|
||||
color : #ffbd4a;
|
||||
}
|
||||
|
||||
.card-box-ptmagic-outlined {
|
||||
background: none;
|
||||
border: 1px solid #33b5e5;
|
||||
background : none;
|
||||
border : 1px solid #33b5e5;
|
||||
border-radius: 5px;
|
||||
color: #33b5e5;
|
||||
color : #33b5e5;
|
||||
}
|
||||
|
||||
.card-box-ptmagic-status-outlined {
|
||||
background: none;
|
||||
border: 1px solid #33b5e5;
|
||||
background : none;
|
||||
border : 1px solid #33b5e5;
|
||||
border-radius: 5px;
|
||||
color: #33b5e5;
|
||||
padding: 7px;
|
||||
color : #33b5e5;
|
||||
padding : 7px;
|
||||
}
|
||||
|
||||
.ptmagic-version {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
width: 100%;
|
||||
position : absolute;
|
||||
bottom : 10px;
|
||||
width : 100%;
|
||||
}
|
||||
|
||||
.table {
|
||||
color : white;
|
||||
font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size : 12px;
|
||||
}
|
||||
|
||||
/* If the screen size is 400px wide or less, set the font-size of <div> to 30px */
|
||||
@media screen and (max-width: 400px) {
|
||||
.table {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.tablesaw-sortable .tablesaw-sortable-head button {
|
||||
|
@ -135,20 +150,18 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.errorRow
|
||||
{
|
||||
.errorRow {
|
||||
background-color: #550000;
|
||||
}
|
||||
|
||||
.errorRow a
|
||||
{
|
||||
.errorRow a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.table-scroll-hori {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
display : block;
|
||||
width : 100%;
|
||||
overflow-x : auto;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar;
|
||||
}
|
||||
|
||||
|
@ -156,7 +169,7 @@
|
|||
.trades-chart .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point,
|
||||
.profit-chart .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point,
|
||||
.balance-chart .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
|
||||
fill-opacity: 1 !important;
|
||||
fill-opacity : 1 !important;
|
||||
stroke-opacity: 1 !important;
|
||||
}
|
||||
|
||||
|
@ -166,32 +179,36 @@
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu > li > a i {
|
||||
display: inline-block;
|
||||
padding-right: 5px;
|
||||
color: #33b5e5;
|
||||
}
|
||||
#topnav .navigation-menu>li>a i {
|
||||
display : inline-block;
|
||||
padding-right: 5px;
|
||||
color : #33b5e5;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu > li > a {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
#topnav .navigation-menu>li>a {
|
||||
padding-top : 12px;
|
||||
padding-bottom: 10px;
|
||||
padding-left : 10px;
|
||||
padding-right : 10px;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu > li > a:hover, #topnav .navigation-menu > li > a:focus, #topnav .navigation-menu > li > a:active {
|
||||
color: #50cefc;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu > li > a:hover i, #topnav .navigation-menu > li > a:focus i, #topnav .navigation-menu > li > a:active i {
|
||||
color: #c6cace;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu > li .submenu li a i {
|
||||
color: #33b5e5;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#topnav .has-submenu.active > a {
|
||||
#topnav .navigation-menu>li>a:hover,
|
||||
#topnav .navigation-menu>li>a:focus,
|
||||
#topnav .navigation-menu>li>a:active {
|
||||
color: #50cefc;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu>li>a:hover i,
|
||||
#topnav .navigation-menu>li>a:focus i,
|
||||
#topnav .navigation-menu>li>a:active i {
|
||||
color: #c6cace;
|
||||
}
|
||||
|
||||
#topnav .navigation-menu>li .submenu li a i {
|
||||
color: #33b5e5;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#topnav .has-submenu.active>a {
|
||||
color: #50cefc;
|
||||
}
|
|
@ -1009,7 +1009,7 @@ select[multiple] {
|
|||
width: 90%; }
|
||||
|
||||
.wrapper {
|
||||
padding-top: 148px; }
|
||||
padding-top: 130px; }
|
||||
|
||||
.page-title-box {
|
||||
padding: 22px 0; }
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -346,7 +346,7 @@
|
|||
var align = positions[pAlign];
|
||||
var key = pMain + "|" + pAlign;
|
||||
var anchor = globalAnchors[key];
|
||||
if (!anchor || !document.contains(anchor[0])) {
|
||||
if (!anchor || !document.body.contains(anchor[0])) {
|
||||
anchor = globalAnchors[key] = createElem("div");
|
||||
var css = {};
|
||||
css[main] = 0;
|
||||
|
|
Loading…
Reference in New Issue