diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index 2c8d2a1..be101bf 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -2313,10 +2313,26 @@ namespace Core.Main this.LastRuntimeSummary.DCATrigger = dcaDefaultTrigger; + + // Get PROFITPERCENTAGE strategy label + string ProfitPercentageLabel = ""; + for (char c = 'A'; c <= 'Z'; c++) + { + + string buyStrategyName = SettingsHandler.GetCurrentPropertyValue(dcaProperties, "DEFAULT_DCA_" + c + "_buy_strategy", ""); + if (buyStrategyName.Contains("PROFITPERCENTAGE")) + { + + ProfitPercentageLabel = "" + c; + } + } + + this.Log.DoLogInfo("DCA ProfitPercentage Label:" + ProfitPercentageLabel); + // Get configured DCA triggers for (int dca = 1; dca <= maxDCALevel; dca++) { - string dcaTriggerString = SettingsHandler.GetCurrentPropertyValue(dcaProperties, "buy_trigger_" + dca.ToString(), "DEFAULT_DCA_buy_trigger_" + dca.ToString()); + string dcaTriggerString = SettingsHandler.GetCurrentPropertyValue(dcaProperties, ProfitPercentageLabel + "buy_value_" + dca.ToString(), "DEFAULT_DCA_" + ProfitPercentageLabel + "_buy_value_" + dca.ToString()); if (!String.IsNullOrEmpty(dcaTriggerString)) { double dcaTrigger = SystemHelper.TextToDouble(dcaTriggerString, 0, "en-US"); diff --git a/Core/ProfitTrailer/StrategyHelper.cs b/Core/ProfitTrailer/StrategyHelper.cs index 7b0fbf1..285c89c 100644 --- a/Core/ProfitTrailer/StrategyHelper.cs +++ b/Core/ProfitTrailer/StrategyHelper.cs @@ -336,6 +336,45 @@ namespace Core.ProfitTrailer case "anderson": result = String.Concat(strategyLetter, "AND"); break; + case "pdlow": + result = String.Concat(strategyLetter, "PDL"); + break; + case "pdclose": + result = String.Concat(strategyLetter, "PDC"); + break; + case "signal": + result = String.Concat(strategyLetter, "SIG"); + break; + case "changepercentage": + result = String.Concat(strategyLetter, "CHGPCT"); + break; + case "profitpercentage": + result = String.Concat(strategyLetter, "PPCT"); + break; + case "lastdcabuy": + result = String.Concat(strategyLetter, "LASTDCA"); + break; + case "fixedprice": + result = String.Concat(strategyLetter, "FIXED"); + break; + case "lowatrband": + result = String.Concat(strategyLetter, "LATR"); + break; + case "highatrband": + result = String.Concat(strategyLetter, "HATR"); + break; + case "atrpercentage": + result = String.Concat(strategyLetter, "ATRPCT"); + break; + case "vwappercentage": + result = String.Concat(strategyLetter, "VWAP"); + break; + case "mvwappercentage": + result = String.Concat(strategyLetter, "MVWAP"); + break; + case "btcdominance": + result = String.Concat(strategyLetter, "BTCDOM"); + break; case "config som enabled": result = String.Concat(strategyLetter, "SOM"); break; @@ -445,7 +484,19 @@ namespace Core.ProfitTrailer case "dema": case "hma": case "pdhigh": + case "pdlow": + case "pdclose": case "signal": + case "changepercentage": + case "profitpercentage": + case "lastdcabuy": + case "fixedprice": + case "lowatrband": + case "highatrband": + case "atrpercentage": + case "vwappercentage": + case "mvwappercentage": + case "btcdominance": result = true; break; default: diff --git a/Monitor/Pages/DCACalculator.cshtml b/Monitor/Pages/DCACalculator.cshtml index 2d77cfb..a8ba2d1 100644 --- a/Monitor/Pages/DCACalculator.cshtml +++ b/Monitor/Pages/DCACalculator.cshtml @@ -18,7 +18,7 @@

DCA Calculator

- Use this calculator to help building a proper setup for your Profit Trailer settings for ALL_max_trading_pairs, ALL_@maxCostCaption.ToLower()_cost and DCA levels.
+ Use this calculator to help build a proper setup for your Profit Trailer settings for DEFAULT_max_trading_pairs, DEFAULT_@maxCostCaption.ToLower()_cost and DCA PROFITPERCENTAGE buy levels.
To do so enter your available balance and adjust the values to whatever you consider the best setting for your parameters.
If you are having problems understanding the different modes, please read this wiki article.

@@ -39,7 +39,7 @@ In simple mode the DCA calculator will only take your number of pairs, DCA levels and initial cost and will calculate the necessary fundings for you. In this mode the ANDERSON method is quite inaccurate as it will calculate the DCA steps by using the the simple proportional cost for each DCA level, regardless of what level the price may be at the time the DCA buy will happen.
- In advanced mode the DCA calculator will also take your DCA triggers into account for the calculation of the necessary fundings for you. In this mode the ANDERSON method is being calculated more accurate as it will calculate the necessary costs using your buy triggers to calculate the actual cost of coins at the current price according to your triggers and percentages. + In advanced mode the DCA calculator will also take your DCA PROFITPERCENTAGE buy levels into account for the calculation of the necessary fundings for you. In this mode the ANDERSON method is being calculated more accurate as it will calculate the necessary costs using your buy levels to calculate the actual cost of coins at the current price according to your triggers and percentages.