@page @model SalesAnalyzer @using System.Globalization @{ 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.

}

@{ var days = Math.Min(Model.DailyStats.Count, 30); }

Daily Buys/Sales (@days Days)

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

Unable to load graph, no sales data found.

}

@{ int totalDays = Model.PTData.DailyPNL.Count; 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; }

Averages

     (@startDate - @endDate) @if(Model.PropertiesData.IsLeverageExchange) { }
Total AVG/Day AVG/Month
Sales @totalSales @avgDailySales @avgMonthlySales
@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 @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")))
@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

@Model.PTData.Misc.Market @Model.PTData.Properties.Currency 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")) %
@{ var maxDays = Math.Min(Model.DailyStats.Count, Math.Min(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDailySummaries, 30)); }

Last @maxDays Days

@{ for (int i = 0; i < maxDays; i++) { DateTime salesDate = DateTime.ParseExact(Model.PTData.DailyStats[i].Date, "d-M-yyyy", CultureInfo.InvariantCulture); var buys = Model.PTData.DailyStats[i].TotalBuys; var sales = Model.PTData.DailyStats[i].TotalSales; var profit = Model.PTData.DailyStats[i].TotalProfit; var avgProfit = Model.PTData.DailyStats[i].AvgProfit; var profitFiat = Math.Round(profit * Model.PTData.Misc.FiatConversionRate, 0); } }
Day Buys Sales Profit @Model.Summary.MainMarket Profit @Model.PTData.Properties.Currency Gain
@salesDate.ToString("yyyy-MM-dd") @buys @sales @profit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Math.Round(profitFiat,0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @avgProfit.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) %
@{ var maxMonths = Math.Min(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxMonthlySummaries, Model.MonthlyStats.Count); }

Last @maxMonths months

@{ for (int i = 0; i < maxMonths; i++) { DateTime monthDate = DateTime.ParseExact(Model.PTData.MonthlyStats[i].Month, "M-yyyy", CultureInfo.InvariantCulture); string monthName = monthDate.ToString("MMMM", CultureInfo.InvariantCulture); var sales = Model.PTData.MonthlyStats[i].TotalSales; var profit = Model.PTData.MonthlyStats[i].TotalProfitCurrency; var profitFiat = Math.Round(profit * Model.PTData.Misc.FiatConversionRate, 0); var growth = Math.Round(Model.PTData.MonthlyStats[i].AvgGrowth,2); } }
Month Sales Profit @Model.Summary.MainMarket Profit @Model.PTData.Properties.Currency Growth
@monthName @sales @profit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @profitFiat @growth %
@*
*@

Top @Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxTopMarkets Sales Markets

@{ int rank = 1; foreach (var pair in Model.ProfitablePairs) { string coin = pair.Coin; double profit = Math.Round(pair.ProfitCurrency,8); int sales = pair.SoldTimes; double avg = Math.Round(pair.Avg,8); double profitFiat = Math.Round(profit * Model.MiscData.FiatConversionRate, 0); rank++; } }
Rank Market Profit @Model.PTData.Misc.Market Sales Avg/Trade
@rank @coin @profit @sales @avg
@*
*@
} @section Scripts { }