@page @model DashboardTopModel @{ Layout = null; } @{ bool sideBySide = true; }
@if (Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries>0) {

Possible Buys (@Model.PTData.BuyLog.Count)more

@if (Model.PTData.BuyLog.Count == 0) {

Your Profit Trailer did not find anything worth buying so far.

} else { @foreach (Core.Main.DataObjects.PTMagicData.BuyLogData buyLogEntry in Model.PTData.BuyLog.OrderBy(b => b.IsSom). ThenByDescending(b => b.IsTrailing). ThenByDescending(b => b.IsTrue). ThenByDescending(b => b.TrueStrategyCount). ThenByDescending(b => b.PercChange). Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries)) { Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null; if (Model.Summary.MarketSummary.ContainsKey(buyLogEntry.Market)) { mps = Model.Summary.MarketSummary[buyLogEntry.Market]; } bool isTrailingBuyActive = buyLogEntry.IsTrailing; if (buyLogEntry.BuyStrategies.Count > 0) { isTrailingBuyActive = (buyLogEntry.BuyStrategies.FindAll(bs => bs.IsTrailing).Count > 0); } bool isBuyStrategyTrue = buyLogEntry.IsTrue; if (buyLogEntry.BuyStrategies.Count > 0) { isBuyStrategyTrue = (buyLogEntry.BuyStrategies.FindAll(bs => !bs.IsTrue).Count == 0); } bool buyDisabled = false; string buyStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, buyLogEntry.BuyStrategies, buyLogEntry.BuyStrategy, isBuyStrategyTrue, isTrailingBuyActive); if (!Core.ProfitTrailer.StrategyHelper.IsValidStrategy(buyStrategyText, true)) { buyDisabled = true; } @if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) { } else { } @if (buyDisabled) { } else { } }
Market Volume Ask Buy Strategies
@buyLogEntry.Market
@Html.Raw((buyLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) %
@Html.Raw((buyLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) % @string.Format("{0}", (buyLogEntry.Volume24h).ToString()) @buyLogEntry.CurrentPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))@Html.Raw(buyStrategyText)@Html.Raw(buyStrategyText)
@if (Model.PTData.BuyLog.Count > Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries) {

@Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries of @Model.PTData.BuyLog.Count items listed - View all items

} }
}

Positions (@Model.PTData.DCALog.Count)more

@if (Model.PTData.DCALog.Count == 0) {

Profit Trailer is not reporting any holdings on your exchange.

} else {
@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]; } string bagAgeText = Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(Model.DateTimeNow.Subtract(dcaLogEntry.FirstBoughtDate).TotalSeconds), true, true); 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.SellStrategies.Count > 0) { isSellStrategyTrue = (dcaLogEntry.SellStrategies.FindAll(ss => !ss.IsTrue).Count == 0); } string leverage = ""; double leverageValue = 1; string buyStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.BuyStrategies, dcaLogEntry.BuyStrategy, isBuyStrategyTrue, isTrailingBuyActive); 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 = !(sellStrategyText.Contains("WATCHMODE")) && !(sellStrategyText.Contains("PENDING")) && ((dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0)); // Profit percentage var profitPercentage = dcaLogEntry.ProfitPercent; // Render the row if (!sellStrategyText.Contains("PENDING-BUY")) { @if (!@lostValue) { //@if (!sellStrategyText.Contains("WATCHMODE")) //{ @if (sellStrategyText.Contains("CROSSED")) // if leverage, recalculate profit target { string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("CROSSED")+9); leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); leverageValue = double.Parse(leverage); } @if (sellStrategyText.Contains("ISOLATED")) { string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("ISOLATED")+10); leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); leverageValue = double.Parse(leverage); } //profitPercentage = profitPercentage * leverageValue; @if ( !(sellStrategyText.Contains("WATCHMODE")) && !(sellStrategyText.Contains("PENDING"))) { double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.GetValueOrDefault(); } else { } //} } else { } { // Aggregate totals double bagGain = (profitPercentage / 100) * dcaLogEntry.TotalCost; Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost; Model.TotalBagGain = Model.TotalBagGain + bagGain; } } }
Market Cost DCA Sell Profit
@if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) { @dcaLogEntry.Market } else { @dcaLogEntry.Market   }
@Html.Raw((dcaLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) %
@Html.Raw(dcaLogEntry.TotalCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US")))
@bagAgeText
@if (dcaEnabled) { if (dcaLogEntry.BoughtTimes > 0) { @dcaLogEntry.BoughtTimes; } } else { } @Html.Raw(buyStrategyText) @Html.Raw(sellStrategyText) @TargetGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) %
None

@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) %
Lost Value!
Totals: @Html.Raw(Model.TotalBagCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US"))) @Html.Raw((((Model.TotalBagGain) / Model.TotalBagCost) * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) %
@if (Model.PTData.DCALog.Count > Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries) {

@Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries of @Model.PTData.DCALog.Count items listed - View all items

} }