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

Applied Single Market Settings


@{ Model.CreateSmsList(); foreach (string sms in Model.smsList) { int smsCount = 0; foreach (Core.Main.DataObjects.PTMagicData.SingleMarketSettingSummary smsSummary in Model.SingleMarketSettingSummaries) { if (smsSummary.SingleMarketSetting.SettingName == sms) { smsCount = smsCount + 1; } } @sms: @smsCount     } }


@{ string lastMarket = ""; } @foreach (Core.Main.DataObjects.PTMagicData.SingleMarketSettingSummary smsSummary in Model.SingleMarketSettingSummaries.OrderBy(s => s.Market)) { Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null; if (Model.Summary.MarketSummary.ContainsKey(smsSummary.Market)) { mps = Model.Summary.MarketSummary[smsSummary.Market]; } else { mps = new Core.Main.DataObjects.PTMagicData.MarketPairSummary(); } bool settingHasOffTriggers = false; if (smsSummary.SingleMarketSetting.OffTriggers.Count > 0) { settingHasOffTriggers = true; } int activeSeconds = (int)Math.Floor(DateTime.UtcNow.Subtract(smsSummary.ActivationDateTimeUTC).TotalSeconds); int activeHours = (int)Math.Floor(DateTime.UtcNow.Subtract(smsSummary.ActivationDateTimeUTC).TotalHours); lastMarket = smsSummary.Market; }
Market Name Volume Last Price Active Setting Triggered time Off Triggers Current Value
@if (!lastMarket.Equals(smsSummary.Market)) { @smsSummary.Market } @if (!lastMarket.Equals(smsSummary.Market)) { @Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket } @if (!lastMarket.Equals(smsSummary.Market)) { @mps.LatestPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket } @Core.Helper.SystemHelper.SplitCamelCase(smsSummary.SingleMarketSetting.SettingName) @Core.Helper.SystemHelper.GetProperDurationTime(activeSeconds) @if (settingHasOffTriggers) { foreach (Core.Main.DataObjects.PTMagicData.OffTrigger ot in smsSummary.SingleMarketSetting.OffTriggers) { string triggerTextClass = "text-danger"; if (ot.HoursSinceTriggered > 0) { triggerTextClass = (activeHours >= ot.HoursSinceTriggered) ? "text-success" : "text-danger";

Hours Since Triggered@ot.HoursSinceTriggered

} if (ot.Min24hVolume > 0 || ot.Max24hVolume < Core.Main.Constants.Max24hVolume) { triggerTextClass = (mps.Latest24hVolume >= ot.Min24hVolume && mps.Latest24hVolume <= ot.Max24hVolume) ? "text-success" : "text-danger";

Volume @if (ot.Min24hVolume > 0) { @("min: " + ot.Min24hVolume.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + " " + Model.Summary.MainMarket) } @if (ot.Min24hVolume > 0 && ot.Max24hVolume < Core.Main.Constants.Max24hVolume) { @(", ") } @if (ot.Max24hVolume < Core.Main.Constants.Max24hVolume) { @("max: " + ot.Max24hVolume.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + " " + Model.Summary.MainMarket) }

} if (ot.Max24hVolume < Core.Main.Constants.Max24hVolume) { triggerTextClass = (mps.Latest24hVolume <= ot.Max24hVolume) ? "text-success" : "text-danger";

Max 24h Volume@ot.Max24hVolume.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket

} if (!ot.MarketTrendName.Equals("")) { double trendChange = Model.GetTrendChange(ot.MarketTrendName, mps, smsSummary.TriggerSnapshot, ot.MarketTrendRelation); triggerTextClass = (trendChange >= ot.MinChange && trendChange <= ot.MaxChange) ? "text-success" : "text-danger";

@Core.Helper.SystemHelper.SplitCamelCase(ot.MarketTrendName) (@Core.Helper.SystemHelper.SplitCamelCase(ot.MarketTrendRelation)) @if (ot.MinChange > Core.Main.Constants.MinTrendChange) { @("min: " + ot.MinChange.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%") } @if (ot.MinChange > Core.Main.Constants.MinTrendChange && ot.MaxChange < Core.Main.Constants.MaxTrendChange) { @(", ") } @if (ot.MaxChange < Core.Main.Constants.MaxTrendChange) { @("max: " + ot.MaxChange.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%") }

} } } else { Not specified }
@if (settingHasOffTriggers) { foreach (Core.Main.DataObjects.PTMagicData.OffTrigger ot in smsSummary.SingleMarketSetting.OffTriggers) { string triggerTextClass = "text-danger"; if (ot.HoursSinceTriggered > 0) { triggerTextClass = (activeHours >= ot.HoursSinceTriggered) ? "text-success" : "text-danger";

@activeHours.ToString(new System.Globalization.CultureInfo("en-US"))

} if (ot.Min24hVolume > 0) { triggerTextClass = (mps.Latest24hVolume >= ot.Min24hVolume) ? "text-success" : "text-danger";

@Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket

} if (ot.Max24hVolume < Core.Main.Constants.Max24hVolume) { triggerTextClass = (mps.Latest24hVolume <= ot.Max24hVolume) ? "text-success" : "text-danger";

@Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket

} if (!ot.MarketTrendName.Equals("")) { if (mps.MarketTrendChanges.ContainsKey(ot.MarketTrendName)) { double trendChange = Model.GetTrendChange(ot.MarketTrendName, mps, smsSummary.TriggerSnapshot, ot.MarketTrendRelation); triggerTextClass = (trendChange >= ot.MinChange && trendChange <= ot.MaxChange) ? "text-success" : "text-danger"; string trendChangeOutput = trendChange.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));

@trendChangeOutput%

} } } }
@if (settingHasOffTriggers) { @if (Model.PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected) { Reset } else { Reset } }
@section Scripts { }