@if (Model.PTData.DCALog.Count == 0) {
Your Profit Trailer did not buy anything so far that's worth analyzing.
} else {
Market |
DCA |
Buy Strats |
Sell Strats |
Profit |
|
@foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in Model.PTData.DCALog.OrderByDescending(d => d.ProfitPercent).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries)) {
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);
@if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) {
@dcaLogEntry.Market |
} else {
@dcaLogEntry.Market |
}
@if (dcaEnabled) {
@if (dcaLogEntry.BoughtTimes > 0) {
@dcaLogEntry.BoughtTimes;
}
} else {
Disabled!
}
|
@if (buyDisabled) {
@Html.Raw(buyStrategyText) |
} else {
@Html.Raw(buyStrategyText) |
}
@Html.Raw(sellStrategyText) |
@if (isTrailingSellActive) {
}
@dcaLogEntry.ProfitPercent.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
}
}