@page @model StatusSummaryModel @{ ViewData["Title"] = ""; } @section Styles { }

PTMagic Status

@{ DateTime lastRuntime = Model.Summary.LastRuntime; double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds; double intervalSeconds = Model.PTMagicConfiguration.AnalyzerSettings.MarketAnalyzer.IntervalMinutes * 60.0; string ptMagicHealthIcon = ""; if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds)) { ptMagicHealthIcon = ""; } string floodProtectionIcon = ""; if (Model.Summary.FloodProtectedSetting != null) { floodProtectionIcon = ""; } string lastGlobalSettingSwitch = Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(DateTime.UtcNow.Subtract(Model.Summary.LastGlobalSettingSwitch).TotalSeconds)) + " ago"; if (Model.Summary.LastGlobalSettingSwitch == Core.Main.Constants.confMinDate) { lastGlobalSettingSwitch = "-"; } int activeSingleSettings = Model.MarketsWithSingleSettings.Count; string singleSettingInfoIcon = ""; if (activeSingleSettings > 0) { singleSettingInfoIcon = "Single Market Settings active for:
-" + Core.Helper.SystemHelper.ConvertListToTokenString(Model.MarketsWithSingleSettings, "
-", true) + "\" data-template=\"\">
"; } }
Active Global Setting @Html.Raw(floodProtectionIcon) @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
Last Runtime @Html.Raw(ptMagicHealthIcon) @Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(elapsedSecondsSinceRuntime)) ago
Last Runtime Length @Core.Helper.SystemHelper.GetProperDurationTime(Model.Summary.LastRuntimeSeconds)
Last Setting Switch @lastGlobalSettingSwitch
Active Single Settings @Html.Raw(singleSettingInfoIcon) @activeSingleSettings

Active Settings

@{ string maxCostCaption = "Initial"; } @if (Model.Summary.MaxCost > 0) { } else { }
Max Pairs @Model.Summary.MaxTradingPairs.ToString(new System.Globalization.CultureInfo("en-US"))@maxCostCaption Cost @Model.Summary.MaxCost.ToString(new System.Globalization.CultureInfo("en-US"))@maxCostCaption Cost % @Model.Summary.MaxCostPercentage.ToString(new System.Globalization.CultureInfo("en-US"))
DCA Level @Model.Summary.DCALevels.ToString(new System.Globalization.CultureInfo("en-US")) Min Vol. @Model.Summary.MinBuyVolume.ToString(new System.Globalization.CultureInfo("en-US"))
Trailing Buy @Model.Summary.TrailingBuy.ToString(new System.Globalization.CultureInfo("en-US")) Trailing Profit @Model.Summary.TrailingProfit.ToString(new System.Globalization.CultureInfo("en-US"))

Active Buy Strategies

@if (Model.Summary.BuyStrategies.Count == 0) { } else { char buyStrategyIndex = 'A'; foreach (Core.Main.DataObjects.PTMagicData.StrategySummary buyStrategy in Model.Summary.BuyStrategies) { buyStrategyIndex++; } }
Buy Strat. @Model.Summary.BuyStrategy Buy Value @Model.Summary.BuyValue.ToString(new System.Globalization.CultureInfo("en-US"))
Buy Strat. @buyStrategyIndex @buyStrategy.Name Buy Value @buyStrategyIndex @buyStrategy.Value.ToString(new System.Globalization.CultureInfo("en-US"))

Active Sell Strategies

@if (Model.Summary.SellStrategies.Count == 0) { } else { char sellStrategyIndex = 'A'; foreach (Core.Main.DataObjects.PTMagicData.StrategySummary sellStrategy in Model.Summary.SellStrategies) { sellStrategyIndex++; } }
Sell Strat. @Model.Summary.SellStrategy Sell Value @Model.Summary.SellValue.ToString(new System.Globalization.CultureInfo("en-US"))
Sell Strat. @sellStrategyIndex @sellStrategy.Name Sell Value @sellStrategyIndex @sellStrategy.Value.ToString(new System.Globalization.CultureInfo("en-US"))

Settings Active Time (Last 24h)

Settings Active Time (Last 3 days)

Global Settings Log

@foreach (Core.Main.DataObjects.PTMagicData.GlobalSettingSummary gss in Model.Summary.GlobalSettingSummary.OrderByDescending(g => g.SwitchDateTime).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxSettingsLogEntries)) { TimeSpan offsetTimeSpan = TimeSpan.Parse(Model.PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", "")); DateTimeOffset settingActivationTime = gss.SwitchDateTime; settingActivationTime = settingActivationTime.ToOffset(offsetTimeSpan); string marketTrendsSummary = ""; foreach (string mt in gss.MarketTrendChanges.Keys) { if (!marketTrendsSummary.Equals("")) { marketTrendsSummary += "
"; } marketTrendsSummary += Core.Helper.SystemHelper.SplitCamelCase(mt) + ": " + gss.MarketTrendChanges[mt].TrendChange.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%"; } }
Activation Time Setting Active Time Market Trends
@settingActivationTime.DateTime.ToShortDateString() @settingActivationTime.DateTime.ToShortTimeString() @Core.Helper.SystemHelper.SplitCamelCase(gss.SettingName) @Core.Helper.SystemHelper.GetProperDurationTime(gss.ActiveSeconds) @Html.Raw(marketTrendsSummary)
@section Scripts { }