@page @model SalesAnalyzer @{ ViewData["Title"] = ""; } @section Styles { }
@{ double totalCurrentValue = double.Parse(Model.PTData.Misc.TotalCurrentValue); string totalCurrentValueString = Model.PTData.Misc.TotalCurrentValue; }
Total Current Value:   @totalCurrentValueString @Model.Summary.MainMarket Starting Value:   @Model.MiscData.StartBalance   @Model.Summary.MainMarket

Cumulative Profits @if (!Model.CumulativeProfitChartDataJSON.Equals("")) {
} else {

Unable to load graph, no sales data found.

}

Daily TCV @if (!Model.TCVChartDataJSON.Equals("")) {
} else {

Unable to load graph, no sales data found.

}

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

No Sales!

Sorry, but your Profit Trailer did not sell anything so far. Please wait for the bot to have at least one sale and you will start seeing data in here.

} else {
@{ int totalDays = Model.PTData.GetTotalDays(); double startBalance = Model.MiscData.StartBalance; double totalSales = Model.PTData.Stats.TotalSales; double totalProfit = Model.PTData.Stats.TotalProfit; double totalFundingFees = Model.PTData.Stats.FundingTotal; double totalPercentGain = ((totalProfit + totalFundingFees) / startBalance) * 100; double totalProfitFiat = @Math.Round((totalProfit + totalFundingFees) * Model.PTData.Misc.FiatConversionRate, 0); double avgDailySales = @Math.Round(totalSales/totalDays, 1); double avgDailyGain = totalPercentGain / totalDays; var MonthlyAveragesResult = Model.MonthlyAverages(Model.PTData.MonthlyStats, Model.PTData.DailyPNL); string startDate = MonthlyAveragesResult.startDate.ToString("d"); string endDate = MonthlyAveragesResult.endDate.ToString("d"); double totalMonths = Math.Round(MonthlyAveragesResult.totalMonths, 1); double avgMonthlySales = @Math.Round(totalSales / totalMonths, 1); double avgMonthlyProfit = totalProfit / totalMonths; double avgMonthlyGain = totalPercentGain / totalMonths; double avgMonthlyFunding = totalFundingFees / totalMonths; }

Sales Analysis

     (@startDate - @endDate) @if(Model.PropertiesData.IsLeverageExchange) { }
Total AVG/Day (@totalDays Days) AVG/Month (@totalMonths Months)
Sales @totalSales @avgDailySales @avgMonthlySales
Profit @Model.PTData.Misc.Market @totalProfit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Math.Round(totalProfit / totalDays, 8).ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @avgMonthlyProfit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))
Funding Fees @Html.Raw(Math.Round(totalFundingFees,8).ToString("#0.00000000", new System.Globalization.CultureInfo("en-US"))) @Html.Raw(Math.Round(totalFundingFees / totalDays,8).ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))) @Html.Raw(Math.Round(totalFundingFees / totalMonths,8).ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")))
Profit @Model.PTData.Properties.Currency @Html.Raw(Math.Round(totalProfitFiat,0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Html.Raw(Math.Round(totalProfitFiat / totalDays, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Html.Raw(Math.Round(totalProfitFiat / totalMonths, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")))
% Gain @totalPercentGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% @avgDailyGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% @avgMonthlyGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
@{ double estimatedBalance1Week = Math.Round(totalCurrentValue * Math.Pow((1 + (avgDailyGain / 100)), 7.0), 8); double estimatedBalance1Month = Math.Round(totalCurrentValue * Math.Pow((1 + (avgDailyGain / 100)), 30.0), 8); double estimatedBalance3Months = Math.Round(totalCurrentValue * Math.Pow((1 + (avgDailyGain / 100)), 90.0), 8); double estimatedBalance6Months = Math.Round(totalCurrentValue * Math.Pow((1 + (avgDailyGain / 100)), 180.0), 8); double estimatedBalance1Year = Math.Round(totalCurrentValue * Math.Pow((1 + (avgDailyGain / 100)), 365.0), 8); }

TCV Prediction

Est. TCV Est. @Model.PTData.Properties.Currency Value Est. Gain
1 Week @estimatedBalance1Week.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Math.Round(estimatedBalance1Week * Model.MiscData.FiatConversionRate, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Math.Round((estimatedBalance1Week - totalCurrentValue) / totalCurrentValue * 100, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
1 Month @estimatedBalance1Month.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Math.Round(estimatedBalance1Month * Model.MiscData.FiatConversionRate, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Math.Round((estimatedBalance1Month - totalCurrentValue) / totalCurrentValue * 100, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
3 Months @estimatedBalance3Months.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Math.Round(estimatedBalance3Months * Model.MiscData.FiatConversionRate, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Math.Round((estimatedBalance3Months - totalCurrentValue) / totalCurrentValue * 100, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
6 Months @estimatedBalance6Months.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Math.Round(estimatedBalance6Months * Model.MiscData.FiatConversionRate, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Math.Round((estimatedBalance6Months - totalCurrentValue) / totalCurrentValue * 100, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
1 Year @estimatedBalance1Year.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Math.Round(estimatedBalance1Year * Model.MiscData.FiatConversionRate, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US"))) @Math.Round((estimatedBalance1Year - totalCurrentValue) / totalCurrentValue * 100, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%

Daily Sales

Daily Profit @if (!Model.ProfitChartDataJSON.Equals("")) {
} else {

Unable to load graph, no sales data found.

}

Last @Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDailySummaries days

@for (DateTime salesDate = Model.DateTimeNow.DateTime.Date; salesDate >= Model.DateTimeNow.DateTime.AddDays(-Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDailySummaries) && salesDate >= Model.MinSellLogDate; salesDate = salesDate.AddDays(-1)) { List salesDateSales = Model.PTData.SellLog.FindAll(sl => sl.SoldDate.Date == salesDate); double salesDateProfit = 0; salesDateProfit = salesDateSales.Sum(sl => sl.Profit); double salesDateProfitFiat = Math.Round(salesDateProfit * Model.Summary.MainMarketPrice, 2); double salesDateStartBalance = Model.PTData.GetSnapshotBalance(salesDate); double salesDateGain = Math.Round(salesDateProfit / salesDateStartBalance * 100, 2); }
Day Sales Profit @Model.Summary.MainMarket Profit @Model.Summary.MainFiatCurrency % Gain
@salesDate.ToShortDateString() @salesDateSales.Count @salesDateProfit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Model.MainFiatCurrencySymbol + salesDateProfitFiat.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) @salesDateGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%

Last @Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxMonthlySummaries months

@{ DateTime minSellLogMonthDate = new DateTime(Model.MinSellLogDate.Year, Model.MinSellLogDate.Month, 1).Date; DateTime salesMonthStartDate = new DateTime(Model.DateTimeNow.DateTime.Year, Model.DateTimeNow.DateTime.Month, 1).Date; } @for (DateTime salesMonthDate = salesMonthStartDate.Date; salesMonthDate >= Model.DateTimeNow.DateTime.AddMonths(-Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxMonthlySummaries) && salesMonthDate >= minSellLogMonthDate; salesMonthDate = salesMonthDate.AddMonths(-1)) { List salesMonthSales = Model.PTData.SellLog.FindAll(sl => sl.SoldDate.Date.Month == salesMonthDate.Month && sl.SoldDate.Date.Year == salesMonthDate.Year); double salesDateProfit = 0; salesDateProfit = salesMonthSales.Sum(sl => sl.Profit); double salesDateProfitFiat = Math.Round(salesDateProfit * Model.Summary.MainMarketPrice, 2); double salesDateStartBalance = Model.PTData.GetSnapshotBalance(salesMonthDate); double salesDateGain = Math.Round(salesDateProfit / salesDateStartBalance * 100, 2); double salesDateAVGDailyGain = 0; double monthDailyProfit = 0; int days = 0; for (int d = 1; d <= DateTime.DaysInMonth(salesMonthDate.Year, salesMonthDate.Month); d++) { DateTime monthDay = salesMonthDate.AddDays(-salesMonthDate.Day + d); if (monthDay <= Model.DateTimeNow) { days++; List monthDaySales = Model.PTData.SellLog.FindAll(sl => sl.SoldDate.Date == monthDay.Date); double monthDayProfit = 0; monthDayProfit = monthDaySales.Sum(sl => sl.Profit); double monthDayStartBalance = Model.PTData.GetSnapshotBalance(monthDay); monthDailyProfit += Math.Round(monthDayProfit / monthDayStartBalance * 100, 2); } } salesDateAVGDailyGain = Math.Round(monthDailyProfit / days, 2); }
Month Sales Profit @Model.Summary.MainMarket Profit @Model.Summary.MainFiatCurrency % Gain AVG %/Day
@salesMonthDate.ToString("MMMM", new System.Globalization.CultureInfo("en-US")) @salesMonthSales.Count @salesDateProfit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Html.Raw(Model.MainFiatCurrencySymbol + salesDateProfitFiat.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) @salesDateGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% @salesDateAVGDailyGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%

Top @Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxTopMarkets Sales Market Analysis

@{ var topMarkets = Model.PTData.SellLog.GroupBy(m => m.Market).Select(mg => mg.Sum(m => m.Profit)); int marketRank = 0; } @foreach (KeyValuePair marketData in Model.TopMarkets) { marketRank++; int trades = Model.PTData.SellLog.FindAll(m => m.Market == marketData.Key).Count; double profitFiat = Math.Round(marketData.Value * Model.Summary.MainMarketPrice, 2); double profitFiatPerTrade = Math.Round(profitFiat / trades, 2); }
Rank Market Sales Profit @Model.Summary.MainMarket Profit @Model.Summary.MainFiatCurrency Profit @Model.Summary.MainFiatCurrency/Trade Profit %/Trade
@marketRank @marketData.Key @trades @marketData.Value.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @profitFiat.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainFiatCurrency @profitFiatPerTrade.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainFiatCurrency @Model.PTData.SellLog.FindAll(m => m.Market == marketData.Key).Average(p => p.ProfitPercent).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
} @section Scripts { }