Merge pull request #40 from JackTerok/develop

Data Structure Changes
This commit is contained in:
HojouFotytu 2019-01-15 22:30:16 +09:00 committed by GitHub
commit d5a4aa3466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 21 deletions

View File

@ -415,7 +415,7 @@ namespace Core.Main.DataObjects.PTMagicData
public int boughtTimes { get; set; }
public string market { get; set; }
public double profit { get; set; }
public AverageCalculator averageCalculator { get; set; }
public double avgPrice { get; set; }
public double currentPrice { get; set; }
public double fee { get; set; }
}
@ -436,10 +436,7 @@ namespace Core.Main.DataObjects.PTMagicData
public class AverageCalculator
{
public double totalCost { get; set; }
public double totalAmount { get; set; }
public double totalAmountWithSold { get; set; }
public double avgPrice { get; set; }
public double avgCost { get; set; }
public double totalWeightedPrice { get; set; }
}
@ -467,7 +464,9 @@ namespace Core.Main.DataObjects.PTMagicData
public double BBTrigger { get; set; }
public double highbb { get; set; }
public double profit { get; set; }
public AverageCalculator averageCalculator { get; set; }
public double avgPrice { get; set; }
public double totalCost { get; set; }
public double totalAmount { get; set; }
public int firstBoughtDate { get; set; }
public double currentPrice { get; set; }
public string sellStrategy { get; set; }

View File

@ -159,7 +159,7 @@ namespace Core.Main.DataObjects
sellLogData.Market = rsld.market;
sellLogData.ProfitPercent = rsld.profit;
sellLogData.SoldPrice = rsld.currentPrice;
sellLogData.AverageBuyPrice = rsld.averageCalculator.avgPrice;
sellLogData.AverageBuyPrice = rsld.avgPrice;
sellLogData.TotalCost = sellLogData.SoldAmount * sellLogData.AverageBuyPrice;
double soldValueRaw = (sellLogData.SoldAmount * sellLogData.SoldPrice);
@ -189,12 +189,12 @@ namespace Core.Main.DataObjects
foreach (dcaLogData rdld in rawDCALogData)
{
DCALogData dcaLogData = new DCALogData();
dcaLogData.Amount = rdld.averageCalculator.totalAmount;
dcaLogData.Amount = rdld.totalAmount;
dcaLogData.BoughtTimes = rdld.boughtTimes;
dcaLogData.Market = rdld.market;
dcaLogData.ProfitPercent = rdld.profit;
dcaLogData.AverageBuyPrice = rdld.averageCalculator.avgPrice;
dcaLogData.TotalCost = rdld.averageCalculator.totalCost;
dcaLogData.AverageBuyPrice = rdld.avgPrice;
dcaLogData.TotalCost = rdld.totalCost;
dcaLogData.BuyTriggerPercent = rdld.buyProfit;
dcaLogData.CurrentLowBBValue = rdld.BBLow;
dcaLogData.CurrentHighBBValue = rdld.highbb;
@ -281,12 +281,12 @@ namespace Core.Main.DataObjects
foreach (dcaLogData rpld in rawPairsLogData)
{
DCALogData dcaLogData = new DCALogData();
dcaLogData.Amount = rpld.averageCalculator.totalAmount;
dcaLogData.Amount = rpld.totalAmount;
dcaLogData.BoughtTimes = 0;
dcaLogData.Market = rpld.market;
dcaLogData.ProfitPercent = rpld.profit;
dcaLogData.AverageBuyPrice = rpld.averageCalculator.avgPrice;
dcaLogData.TotalCost = rpld.averageCalculator.totalCost;
dcaLogData.AverageBuyPrice = rpld.avgPrice;
dcaLogData.TotalCost = rpld.totalCost;
dcaLogData.BuyTriggerPercent = rpld.buyProfit;
dcaLogData.CurrentPrice = rpld.currentPrice;
dcaLogData.SellTrigger = rpld.triggerValue;

View File

@ -29,10 +29,10 @@
"MaxTopMarkets": 20, // The amount of top markets being shown in your Sales Analyzer
"MaxDailySummaries": 10, // The amount of "Last Days" being shown in your Sales Analyzer
"MaxMonthlySummaries": 10, // The amount of "Last Months" being shown in your Sales Analyzer
"TvStudyA": "BB@tv-basicstudies", // See available STUDIES at https://www.tradingview.com/wiki/Widget:TradingView_Widget
"TvStudyB": "",
"TvStudyC": "",
"TvStudyD": ""
"TvStudyA": "BB@tv-basicstudies", // See available STUDIES at https://www.tradingview.com/wiki/Widget:TradingView_Widget
"TvStudyB": "",
"TvStudyC": "",
"TvStudyD": ""
},
"Backup": {
"IsEnabled": true, // Enables a backup procedure for your properties files. Before every switch PTMagic will backup the current properties

View File

@ -29,10 +29,10 @@
"MaxTopMarkets": 20, // The amount of top markets being shown in your Sales Analyzer
"MaxDailySummaries": 10, // The amount of "Last Days" being shown in your Sales Analyzer
"MaxMonthlySummaries": 10, // The amount of "Last Months" being shown in your Sales Analyzer
"TvStudyA": "BB@tv-basicstudies", // See available STUDIES at https://www.tradingview.com/wiki/Widget:TradingView_Widget
"TvStudyB": "",
"TvStudyC": "",
"TvStudyD": "" // The amount of "Last Months" being shown in your Sales Analyzer
"TvStudyA": "BB@tv-basicstudies", // See available STUDIES at https://www.tradingview.com/wiki/Widget:TradingView_Widget
"TvStudyB": "",
"TvStudyC": "",
"TvStudyD": ""
},
"Backup": {
"IsEnabled": true, // Enables a backup procedure for your properties files. Before every switch PTMagic will backup the current properties

View File

@ -28,7 +28,11 @@
"LinkPlatform": "TradingView", // The platform to which the pair name will link if you click on it
"MaxTopMarkets": 20, // The amount of top markets being shown in your Sales Analyzer
"MaxDailySummaries": 10, // The amount of "Last Days" being shown in your Sales Analyzer
"MaxMonthlySummaries": 10 // The amount of "Last Months" being shown in your Sales Analyzer
"MaxMonthlySummaries": 10, // The amount of "Last Months" being shown in your Sales Analyzer
"TvStudyA": "BB@tv-basicstudies", // See available STUDIES at https://www.tradingview.com/wiki/Widget:TradingView_Widget
"TvStudyB": "",
"TvStudyC": "",
"TvStudyD": ""
},
"Backup": {
"IsEnabled": true, // Enables a backup procedure for your properties files. Before every switch PTMagic will backup the current properties