Merge branch 'develop' into develop
This commit is contained in:
commit
849e4268ee
|
@ -269,40 +269,40 @@ namespace Core.ProfitTrailer
|
||||||
result = String.Concat(strategyLetter, "LOSS");
|
result = String.Concat(strategyLetter, "LOSS");
|
||||||
break;
|
break;
|
||||||
case "smagain":
|
case "smagain":
|
||||||
result = String.Concat(strategyLetter, "SMAG");
|
result = String.Concat(strategyLetter, "SMA-G");
|
||||||
break;
|
break;
|
||||||
case "emagain":
|
case "emagain":
|
||||||
result = String.Concat(strategyLetter, "EMAG");
|
result = String.Concat(strategyLetter, "EMA-G");
|
||||||
break;
|
break;
|
||||||
case "hmagain":
|
case "hmagain":
|
||||||
result = String.Concat(strategyLetter, "HMAG");
|
result = String.Concat(strategyLetter, "HMA-G");
|
||||||
break;
|
break;
|
||||||
case "dmagain":
|
case "dmagain":
|
||||||
result = String.Concat(strategyLetter, "DMAG");
|
result = String.Concat(strategyLetter, "DMA-G");
|
||||||
break;
|
break;
|
||||||
case "smaspread":
|
case "smaspread":
|
||||||
result = String.Concat(strategyLetter, "SMAS");
|
result = String.Concat(strategyLetter, "SMA-S");
|
||||||
break;
|
break;
|
||||||
case "emaspread":
|
case "emaspread":
|
||||||
result = String.Concat(strategyLetter, "EMAS");
|
result = String.Concat(strategyLetter, "EMA-S");
|
||||||
break;
|
break;
|
||||||
case "hmaspread":
|
case "hmaspread":
|
||||||
result = String.Concat(strategyLetter, "HMAS");
|
result = String.Concat(strategyLetter, "HMA-S");
|
||||||
break;
|
break;
|
||||||
case "dmaspread":
|
case "dmaspread":
|
||||||
result = String.Concat(strategyLetter, "DMAS");
|
result = String.Concat(strategyLetter, "DMA-S");
|
||||||
break;
|
break;
|
||||||
case "smacross":
|
case "smacross":
|
||||||
result = String.Concat(strategyLetter, "SMAC");
|
result = String.Concat(strategyLetter, "SMA-C");
|
||||||
break;
|
break;
|
||||||
case "emacross":
|
case "emacross":
|
||||||
result = String.Concat(strategyLetter, "EMAC");
|
result = String.Concat(strategyLetter, "EMA-C");
|
||||||
break;
|
break;
|
||||||
case "hmacross":
|
case "hmacross":
|
||||||
result = String.Concat(strategyLetter, "HMAC");
|
result = String.Concat(strategyLetter, "HMA-C");
|
||||||
break;
|
break;
|
||||||
case "dmacross":
|
case "dmacross":
|
||||||
result = String.Concat(strategyLetter, "DMAC");
|
result = String.Concat(strategyLetter, "DMA-C");
|
||||||
break;
|
break;
|
||||||
case "rsi":
|
case "rsi":
|
||||||
result = String.Concat(strategyLetter, "RSI");
|
result = String.Concat(strategyLetter, "RSI");
|
||||||
|
@ -314,13 +314,13 @@ namespace Core.ProfitTrailer
|
||||||
result = String.Concat(strategyLetter, "SRSI");
|
result = String.Concat(strategyLetter, "SRSI");
|
||||||
break;
|
break;
|
||||||
case "stochrsik":
|
case "stochrsik":
|
||||||
result = String.Concat(strategyLetter, "SRSIK");
|
result = String.Concat(strategyLetter, "SRSI-K");
|
||||||
break;
|
break;
|
||||||
case "stochrsid":
|
case "stochrsid":
|
||||||
result = String.Concat(strategyLetter, "SRSID");
|
result = String.Concat(strategyLetter, "SRSI-D");
|
||||||
break;
|
break;
|
||||||
case "stochrsicross":
|
case "stochrsicross":
|
||||||
result = String.Concat(strategyLetter, "SRSIC");
|
result = String.Concat(strategyLetter, "SRSI-C");
|
||||||
break;
|
break;
|
||||||
case "macd":
|
case "macd":
|
||||||
result = String.Concat(strategyLetter, "MACD");
|
result = String.Concat(strategyLetter, "MACD");
|
||||||
|
@ -359,19 +359,19 @@ namespace Core.ProfitTrailer
|
||||||
result = String.Concat(strategyLetter, "FIXED");
|
result = String.Concat(strategyLetter, "FIXED");
|
||||||
break;
|
break;
|
||||||
case "lowatrband":
|
case "lowatrband":
|
||||||
result = String.Concat(strategyLetter, "LATR");
|
result = String.Concat(strategyLetter, "L-ATR");
|
||||||
break;
|
break;
|
||||||
case "highatrband":
|
case "highatrband":
|
||||||
result = String.Concat(strategyLetter, "HATR");
|
result = String.Concat(strategyLetter, "H-ATR");
|
||||||
break;
|
break;
|
||||||
case "atrpercentage":
|
case "atrpercentage":
|
||||||
result = String.Concat(strategyLetter, "ATRPCT");
|
result = String.Concat(strategyLetter, "ATR-PCT");
|
||||||
break;
|
break;
|
||||||
case "vwappercentage":
|
case "vwappercentage":
|
||||||
result = String.Concat(strategyLetter, "VWAP");
|
result = String.Concat(strategyLetter, "VWAP");
|
||||||
break;
|
break;
|
||||||
case "mvwappercentage":
|
case "mvwappercentage":
|
||||||
result = String.Concat(strategyLetter, "MVWAP");
|
result = String.Concat(strategyLetter, "M-VWAP");
|
||||||
break;
|
break;
|
||||||
case "btcdominance":
|
case "btcdominance":
|
||||||
result = String.Concat(strategyLetter, "BTCDOM");
|
result = String.Concat(strategyLetter, "BTCDOM");
|
||||||
|
@ -425,13 +425,13 @@ namespace Core.ProfitTrailer
|
||||||
result = String.Concat(strategyLetter, "NODCA");
|
result = String.Concat(strategyLetter, "NODCA");
|
||||||
break;
|
break;
|
||||||
case "combimagain":
|
case "combimagain":
|
||||||
result = String.Concat(strategyLetter, "COMBIG");
|
result = String.Concat(strategyLetter, "COMBI-G");
|
||||||
break;
|
break;
|
||||||
case "combimaspread":
|
case "combimaspread":
|
||||||
result = String.Concat(strategyLetter, "COMBIS");
|
result = String.Concat(strategyLetter, "COMBI-S");
|
||||||
break;
|
break;
|
||||||
case "combimacross":
|
case "combimacross":
|
||||||
result = String.Concat(strategyLetter, "COMBIC");
|
result = String.Concat(strategyLetter, "COMBI-C");
|
||||||
break;
|
break;
|
||||||
case "macdpercentage":
|
case "macdpercentage":
|
||||||
result = String.Concat(strategyLetter, "MACDPERC");
|
result = String.Concat(strategyLetter, "MACDPERC");
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@{
|
@{
|
||||||
double currentBalance = Model.PTData.GetCurrentBalance();
|
string totalCurrentValueString = Model.totalCurrentValue.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
|
||||||
string currentBalanceString = currentBalance.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
|
if (Model.totalCurrentValue > 100)
|
||||||
if (currentBalance > 100) {
|
{
|
||||||
currentBalanceString = Math.Round(currentBalance, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
totalCurrentValueString = Math.Round(Model.totalCurrentValue, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<th class="m-t-0 header-title text-left">Account Value: <text class="text-autocolor"> @currentBalanceString @Model.Summary.MainMarket </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This is based on your sales history, entries on the Transactions page and any currently held positions."></i></small></th>
|
<th class="m-t-0 header-title text-left">Total Account Value: <text class="text-autocolor"> @totalCurrentValueString @Model.Summary.MainMarket </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This is based on your sales history, entries on the Transactions page and any currently held positions."></i></small></th>
|
||||||
<th class="text-right">Starting Value: <text class="text-autocolor"> @Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance @Model.Summary.MainMarket </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This is the starting value found in your settings file"></i></small></th>
|
<th class="text-right">Starting Value: <text class="text-autocolor"> @Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance @Model.Summary.MainMarket </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This is the starting value found in your settings file"></i></small></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -20,12 +20,13 @@ namespace Monitor.Pages
|
||||||
public Dictionary<DateTime, double> DailyGains = new Dictionary<DateTime, double>();
|
public Dictionary<DateTime, double> DailyGains = new Dictionary<DateTime, double>();
|
||||||
public Dictionary<DateTime, double> MonthlyGains = new Dictionary<DateTime, double>();
|
public Dictionary<DateTime, double> MonthlyGains = new Dictionary<DateTime, double>();
|
||||||
public DateTimeOffset DateTimeNow = Constants.confMinDate;
|
public DateTimeOffset DateTimeNow = Constants.confMinDate;
|
||||||
|
public double totalCurrentValue = 0;
|
||||||
public void OnGet()
|
public void OnGet()
|
||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
BindData();
|
BindData();
|
||||||
|
BuildTCV();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindData()
|
private void BindData()
|
||||||
|
@ -135,5 +136,20 @@ namespace Monitor.Pages
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BuildTCV()
|
||||||
|
{
|
||||||
|
double AvailableBalance = PTData.GetCurrentBalance();
|
||||||
|
foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog)
|
||||||
|
{
|
||||||
|
totalCurrentValue = totalCurrentValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
||||||
|
}
|
||||||
|
totalCurrentValue = totalCurrentValue + AvailableBalance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<div id="AssetDistribution" class="container">
|
<div id="AssetDistribution" class="container">
|
||||||
<div class="row px1">
|
<div class="text-center">
|
||||||
<div class="col-3 px-1 text-center"><small>Start: <text class="text-autocolor">@Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance @Model.Summary.MainMarket</text></small></div>
|
<small>
|
||||||
<div class="col-6 px-1 text-center"><small>TCV: <text class="text-autocolor">@totalCurrentValueString @Model.Summary.MainMarket</text></small></div>
|
<span data-toggle="tooltip" data-placement="top" title="Starting balance from PTM settings">Start: <text class="text-autocolor"> @Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance @Model.Summary.MainMarket </text></span>
|
||||||
<div class="col-3 px-1 text-center"><small>Gain: <text class="text-autocolor">@Math.Round(((Model.totalCurrentValue - Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance) / Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance) * 100, 2)%</text></small></div>
|
<span data-toggle="tooltip" data-placement="top" title="TCV gain on starting balance">     Gain: <text class="text-autocolor">@Math.Round(((Model.totalCurrentValue - Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance) / Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance) * 100, 2)%</text></span>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<span data-toggle="tooltip" data-placement="top" title="Total current account value">TCV: <text class="text-autocolor"> @totalCurrentValueString @Model.Summary.MainMarket </text> </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row px1">
|
<div class="row px1">
|
||||||
<svg style="height:260px;width:100%"></svg>
|
<svg style="height:260px;width:100%"></svg>
|
||||||
|
|
|
@ -19,10 +19,6 @@ namespace Monitor.Pages
|
||||||
public string LastGlobalSetting = "Default";
|
public string LastGlobalSetting = "Default";
|
||||||
public DateTimeOffset DateTimeNow = Constants.confMinDate;
|
public DateTimeOffset DateTimeNow = Constants.confMinDate;
|
||||||
public string AssetDistributionData = "";
|
public string AssetDistributionData = "";
|
||||||
public double currentBalance = 0;
|
|
||||||
public string currentBalanceString = "";
|
|
||||||
public double TotalBagCost = 0;
|
|
||||||
public double TotalBagValue = 0;
|
|
||||||
public double totalCurrentValue = 0;
|
public double totalCurrentValue = 0;
|
||||||
public void OnGet()
|
public void OnGet()
|
||||||
{
|
{
|
||||||
|
@ -171,7 +167,6 @@ namespace Monitor.Pages
|
||||||
|
|
||||||
foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog)
|
foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog)
|
||||||
{
|
{
|
||||||
Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null;
|
|
||||||
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
||||||
|
|
||||||
// Aggregate totals
|
// Aggregate totals
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
<td class="text-autocolor">@string.Format("{0}%", (buyLogEntry.PercChange * 100).ToString("#,#0.00"))</td>
|
<td class="text-autocolor">@string.Format("{0}%", (buyLogEntry.PercChange * 100).ToString("#,#0.00"))</td>
|
||||||
<td class="text">@string.Format("{0}", (buyLogEntry.Volume24h).ToString())</td>
|
<td class="text">@string.Format("{0}", (buyLogEntry.Volume24h).ToString())</td>
|
||||||
<td class="text-left">@buyLogEntry.CurrentPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))</td>
|
<td class="text-left">@buyLogEntry.CurrentPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))</td>
|
||||||
|
|
||||||
@if (buyDisabled) {
|
@if (buyDisabled) {
|
||||||
<td>@Html.Raw(buyStrategyText)</td>
|
<td>@Html.Raw(buyStrategyText)</td>
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue