diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs index 80d9b83..9687e39 100644 --- a/Core/Helper/SystemHelper.cs +++ b/Core/Helper/SystemHelper.cs @@ -472,15 +472,19 @@ namespace Core.Helper if (minutes > 0) { - if (hours > 0 || days > 0) result += " "; - result += minutes.ToString() + "m"; + if (days == 0 || (days > 0 && hours == 0)) + { + result += " "; + result += minutes.ToString() + "m"; + } } - if ((!shortOutput && seconds > 0) || (shortOutput && days == 0)) + if ((days == 0 && hours == 0) || (days > 0 && hours == 0 && minutes == 0) || (days == 0 && hours > 0 && minutes == 0)) { - if (minutes > 0 || hours > 0 || days > 0) result += " "; + result += " "; result += seconds.ToString() + "s"; } + return result; } diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index 405f2eb..82460d6 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.Concurrent; using System.Threading; @@ -702,13 +702,13 @@ namespace Core.Main // Check if the program is enabled if (this.PTMagicConfiguration.GeneralSettings.Application.IsEnabled) { + result = RunProfitTrailerSettingsAPIChecks(); try { if (this.PTMagicConfiguration.GeneralSettings.Application.TestMode) { - this.Log.DoLogInfo("TESTMODE ENABLED - No files will be changed!"); + this.Log.DoLogWarn("TESTMODE ENABLED - No PT settings will be changed!"); } - result = RunProfitTrailerSettingsAPIChecks(); // Check for CoinMarketCap API Key if (!String.IsNullOrEmpty(this.PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey)) @@ -717,7 +717,7 @@ namespace Core.Main } else { - this.Log.DoLogInfo("No CoinMarketCap API KEY specified! You can't use CoinMarketCap in your settings.analyzer.json"); + this.Log.DoLogInfo("No CoinMarketCap API KEY specified! That's ok, but you can't use CoinMarketCap in your settings.analyzer.json"); } // Check for CurrencyConverterApi Key @@ -727,12 +727,12 @@ namespace Core.Main } else { - this.Log.DoLogInfo("No FreeCurrencyConverterApi KEY specified, you can only use USD; apply for a key at: https://freecurrencyrates.com/en"); + this.Log.DoLogInfo("No FreeCurrencyConverterApi KEY specified. That's ok! But you can only use USD; apply for a key at: https://freecurrencyrates.com/en"); } } catch (System.NullReferenceException) { - this.Log.DoLogError("PTM failed to read the Config File. That means something in the File is either missing or incorrect. If this happend after an update please take a look at the release notes at: https://github.com/PTMagicians/PTMagic/releases"); + this.Log.DoLogError("PTM failed to read the General Settings file. That means something in the file is either missing or incorrect. If this happend after an update please take a look at the release notes at: https://github.com/PTMagicians/PTMagic/releases"); Console.WriteLine("Press enter to close the Application..."); Console.ReadLine(); Environment.Exit(0); @@ -740,7 +740,7 @@ namespace Core.Main } else { - this.Log.DoLogWarn("PTMagic disabled, shutting down..."); + this.Log.DoLogWarn("PTMagic is disabled. The scheduled raid was skipped."); result = false; } @@ -915,10 +915,10 @@ namespace Core.Main { this.PairsLines.AddRange(new string[] { "", - "# Binance Futures quarterly futures ignore list", - "###############################################" + "# BinanceFutures Quarterly Contracts - Ignore list:", + "###################################################" }); - + foreach (var marketPair in results) { this.PairsLines.Add(String.Format("{0}_trading_enabled = false", marketPair)); @@ -953,7 +953,7 @@ namespace Core.Main this.Log.DoLogInfo("+ Active setting: " + this.LastRuntimeSummary.CurrentGlobalSetting.SettingName); this.Log.DoLogInfo("+ Global setting changed: " + ((this.LastRuntimeSummary.LastGlobalSettingSwitch == this.LastRuntimeSummary.LastRuntime) ? "Yes" : "No") + " " + ((this.LastRuntimeSummary.FloodProtectedSetting != null) ? "(Flood protection!)" : "")); this.Log.DoLogInfo("+ Single Market Settings changed: " + (this.SingleMarketSettingChanged ? "Yes" : "No")); - this.Log.DoLogInfo("+ PT Config updated: " + (((this.GlobalSettingWritten || this.SingleMarketSettingChanged) && !this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? "Yes" : "No")); + this.Log.DoLogInfo("+ PT Config updated: " + (((this.GlobalSettingWritten || this.SingleMarketSettingChanged) && !this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? "Yes" : "No") + ((this.PTMagicConfiguration.GeneralSettings.Application.TestMode) ? " - TESTMODE active" : "")); this.Log.DoLogInfo("+ Markets with active single market settings: " + this.TriggeredSingleMarketSettings.Count.ToString()); foreach (string activeSMS in this.SingleMarketSettingsCount.Keys) { @@ -970,7 +970,7 @@ namespace Core.Main else { this.State = Constants.PTMagicBotState_Idle; - Log.DoLogWarn("PTMagic disabled, shutting down until next raid..."); + Log.DoLogWarn("PTMagic is disabled. The scheduled raid was skipped."); } } catch (Exception ex) @@ -1235,7 +1235,7 @@ namespace Core.Main } else { - this.Log.DoLogInfo("No CMC API-Key specified. No CMC Data will be pulled"); + this.Log.DoLogInfo("No CMC API-Key specified. That's OK, but no CMC Data can be pulled."); } if (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Bittrex", StringComparison.InvariantCultureIgnoreCase)) @@ -1526,12 +1526,22 @@ namespace Core.Main int marketPairProcess = 1; Dictionary> matchedMarketTriggers = new Dictionary>(); + string mainMarket = this.LastRuntimeSummary.MainMarket; // Loop through markets foreach (string marketPair in this.MarketList) { this.Log.DoLogDebug("'" + marketPair + "' - Checking triggers (" + marketPairProcess.ToString() + "/" + this.MarketList.Count.ToString() + ")..."); - + string market = marketPair.Replace(mainMarket, ""); + switch (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.ToLower()) + { + case "bittrex": + market = market.Replace("-", ""); + break; + case "poloniex": + market = market.Replace("_", ""); + break; + } bool stopTriggers = false; // Loop through single market settings @@ -1540,16 +1550,42 @@ namespace Core.Main List matchedSingleMarketTriggers = new List(); // Check ignore markets - List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredMarkets, ","); - if (ignoredMarkets.Any(im => marketPair.StartsWith(im, StringComparison.InvariantCultureIgnoreCase))) + + // Strip main markets from list, if exists + string ignored = marketSetting.IgnoredMarkets.ToUpper(); + ignored = ignored.Replace(mainMarket, ""); + switch (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.ToLower()) + { + case "bittrex": + ignored = ignored.Replace("-", ""); + break; + case "poloniex": + ignored = ignored.Replace("_", ""); + break; + } + List ignoredMarkets = SystemHelper.ConvertTokenStringToList(ignored, ","); + if (ignoredMarkets.Contains(market)) { this.Log.DoLogDebug("'" + marketPair + "' - Is ignored in '" + marketSetting.SettingName + "'."); continue; } // Check allowed markets - List allowedMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.AllowedMarkets, ","); - if (allowedMarkets.Count > 0 && !allowedMarkets.Any(am => marketPair.StartsWith(am, StringComparison.InvariantCultureIgnoreCase))) + + // Strip main markets from list, if exists + string allowed = marketSetting.AllowedMarkets.ToUpper(); + allowed = allowed.Replace(mainMarket, ""); + switch (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.ToLower()) + { + case "bittrex": + allowed = allowed.Replace("-", ""); + break; + case "poloniex": + allowed = allowed.Replace("_", ""); + break; + } + List allowedMarkets = SystemHelper.ConvertTokenStringToList(allowed, ","); + if (allowedMarkets.Count > 0 && !allowedMarkets.Contains(market)) { this.Log.DoLogDebug("'" + marketPair + "' - Is not allowed in '" + marketSetting.SettingName + "'."); continue; @@ -2159,9 +2195,12 @@ namespace Core.Main if (!this.PTMagicConfiguration.GeneralSettings.Application.TestMode) { SettingsAPI.SendPropertyLinesToAPI(this.PairsLines, this.DCALines, this.IndicatorsLines, this.PTMagicConfiguration, this.Log); + this.Log.DoLogInfo("Settings updates sent to PT!"); + } + else + { + this.Log.DoLogWarn("TESTMODE enabled -- no updates sent to PT!"); } - - this.Log.DoLogInfo("Properties saved!"); } else { diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs index 5c1b66e..120faab 100644 --- a/Core/MarketAnalyzer/BaseAnalyzer.cs +++ b/Core/MarketAnalyzer/BaseAnalyzer.cs @@ -309,16 +309,51 @@ namespace Core.MarketAnalyzer } Market recentMarket; + string market = recentMarketPair.Value.Symbol.Replace(mainMarket, ""); + string exchange = systemConfiguration.GeneralSettings.Application.Exchange.ToLower(); + switch (exchange) + { + case "bittrex": + market = market.Replace("-", ""); + break; + case "poloniex": + market = market.Replace("_", ""); + break; + } if (recentMarkets.TryGetValue(recentMarketPair.Key, out recentMarket)) { - List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketTrend.IgnoredMarkets, ","); - if (ignoredMarkets.Contains(recentMarketPair.Value.Symbol)) + // Strip main markets from lists, if exists + string ignored = marketTrend.IgnoredMarkets.ToUpper(); + ignored = ignored.Replace(mainMarket, ""); + switch (exchange) + { + case "bittrex": + ignored = ignored.Replace("-", ""); + break; + case "poloniex": + ignored = ignored.Replace("_", ""); + break; + } + List ignoredMarkets = SystemHelper.ConvertTokenStringToList(ignored, ","); + if (ignoredMarkets.Contains(market)) { log.DoLogDebug(platform + " - Market trend '" + marketTrend.Name + "' for '" + recentMarketPair.Key + "' is ignored in this trend."); continue; } - List allowedMarkets = SystemHelper.ConvertTokenStringToList(marketTrend.AllowedMarkets, ","); - if (allowedMarkets.Count > 0 && !allowedMarkets.Contains(recentMarketPair.Value.Symbol)) + // Strip main markets from lists, if exists + string allowed = marketTrend.AllowedMarkets.ToUpper(); + allowed = allowed.Replace(mainMarket, ""); + switch (exchange) + { + case "bittrex": + allowed = allowed.Replace("-", ""); + break; + case "poloniex": + allowed = allowed.Replace("_", ""); + break; + } + List allowedMarkets = SystemHelper.ConvertTokenStringToList(allowed, ","); + if (allowedMarkets.Count > 0 && !allowedMarkets.Contains(market)) { log.DoLogDebug(platform + " - Market trend '" + marketTrend.Name + "' for '" + recentMarketPair.Key + "' is not allowed in this trend."); continue; diff --git a/Core/MarketAnalyzer/Binance.cs b/Core/MarketAnalyzer/Binance.cs index f6f0bc5..3d28203 100644 --- a/Core/MarketAnalyzer/Binance.cs +++ b/Core/MarketAnalyzer/Binance.cs @@ -361,12 +361,12 @@ namespace Core.MarketAnalyzer ConcurrentDictionary> marketTicks = new ConcurrentDictionary>(); int ParallelThrottle = 4; - if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 200) + if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 50) { ParallelThrottle = 2; log.DoLogInfo("----------------------------------------------------------------------------"); - log.DoLogInfo("StoreDataMaxHours is greater than 200. Historical data requests will be"); - log.DoLogInfo("throttled to avoid exceeding exchange data request limits. This initial "); + log.DoLogInfo("StoreDataMaxHours is greater than 50. Historical data requests will be"); + log.DoLogInfo("throttled to avoid exceeding exchange request limits. This initial "); log.DoLogInfo("run could take more than 30 minutes. Please go outside for a walk..."); log.DoLogInfo("----------------------------------------------------------------------------"); } diff --git a/Core/MarketAnalyzer/BinanceFutures.cs b/Core/MarketAnalyzer/BinanceFutures.cs index 5a02643..1552a66 100644 --- a/Core/MarketAnalyzer/BinanceFutures.cs +++ b/Core/MarketAnalyzer/BinanceFutures.cs @@ -71,9 +71,7 @@ namespace Core.MarketAnalyzer //New variables for filtering out bad markets float marketLastPrice = currencyTicker["lastPrice"].ToObject(); float marketVolume = currencyTicker["volume"].ToObject(); - if (marketName.EndsWith(mainMarket, StringComparison.InvariantCultureIgnoreCase)) - { - if (marketLastPrice > 0 && marketVolume > 0) + if (marketLastPrice > 0 && marketVolume > 0) { // Set last values in case any error occurs @@ -97,7 +95,6 @@ namespace Core.MarketAnalyzer //Let the user know that the problem market was ignored. log.DoLogInfo("BinanceFutures - Ignoring bad market data for " + marketName); } - } } BinanceFutures.CheckFirstSeenDates(markets, ref marketInfos, systemConfiguration, log); @@ -361,11 +358,11 @@ namespace Core.MarketAnalyzer ConcurrentDictionary> marketTicks = new ConcurrentDictionary>(); int ParallelThrottle = 4; - if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 200) + if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 50) { ParallelThrottle = 2; log.DoLogInfo("----------------------------------------------------------------------------"); - log.DoLogInfo("StoreDataMaxHours is greater than 200. Historical data requests will be"); + log.DoLogInfo("StoreDataMaxHours is greater than 50. Historical data requests will be"); log.DoLogInfo("throttled to avoid exceeding exchange data request limits. This initial "); log.DoLogInfo("run could take more than 30 minutes. Please go outside for a walk..."); log.DoLogInfo("----------------------------------------------------------------------------"); diff --git a/Monitor/Pages/MarketAnalyzer.cshtml b/Monitor/Pages/MarketAnalyzer.cshtml index 37a7ff2..15bd1d1 100644 --- a/Monitor/Pages/MarketAnalyzer.cshtml +++ b/Monitor/Pages/MarketAnalyzer.cshtml @@ -183,14 +183,15 @@ else @Core.Helper.SystemHelper.SplitCamelCase(marketTrend.Name) @marketCountString - @Core.Helper.SystemHelper.GetProperDurationTime(marketTrend.TrendMinutes * 60, false) @if (marketTrend.TrendThreshold == 0) - { - -- - } - else - { - @marketTrend.TrendThreshold - } + @Core.Helper.SystemHelper.GetProperDurationTime(marketTrend.TrendMinutes * 60, false) + @if (marketTrend.TrendThreshold == 0) + { + -- + } + else + { + @marketTrend.TrendThreshold + } @trendChangeOutput% } @@ -275,18 +276,18 @@ else @mps.LatestPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket @Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket @foreach (Core.Main.DataObjects.PTMagicData.MarketTrend marketTrend in marketTrends) { - if (mps.MarketTrendChanges.ContainsKey(marketTrend.Name)) { + if (mps.MarketTrendChanges.ContainsKey(marketTrend.Name)) + { marketTrendsDisplayed++; string trendChangeOutput = mps.MarketTrendChanges[marketTrend.Name].ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")); - if ((mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) || (mps.MarketTrendChanges[marketTrend.Name] > marketTrend.TrendThreshold) ) - { -   @trendChangeOutput% - } - else - { - @trendChangeOutput% - } - + if (marketTrend.TrendThreshold != 0 && Math.Abs(mps.MarketTrendChanges[marketTrend.Name]) > marketTrend.TrendThreshold) + { +   @trendChangeOutput% + } + else + { + @trendChangeOutput% + } } } @for (int i = 0; i < marketTrends.Count - marketTrendsDisplayed; i++) { diff --git a/Monitor/Pages/SettingsAnalyzer.cshtml.cs b/Monitor/Pages/SettingsAnalyzer.cshtml.cs index 0fd8bb9..dcca15d 100644 --- a/Monitor/Pages/SettingsAnalyzer.cshtml.cs +++ b/Monitor/Pages/SettingsAnalyzer.cshtml.cs @@ -185,6 +185,8 @@ namespace Monitor.Pages sms.OffTriggerConnection = HttpContext.Request.Form[smsFormKey + "OffTriggerConnection"]; sms.IgnoredMarkets = HttpContext.Request.Form[smsFormKey + "IgnoredMarkets"]; sms.AllowedMarkets = HttpContext.Request.Form[smsFormKey + "AllowedMarkets"]; + sms.IgnoredGlobalSettings = HttpContext.Request.Form[smsFormKey + "IgnoredGlobalSettings"]; + sms.AllowedGlobalSettings = HttpContext.Request.Form[smsFormKey + "AllowedGlobalSettings"]; sms.StopProcessWhenTriggered = HttpContext.Request.Form[smsFormKey + "StopProcessWhenTriggered"].Equals("on"); #region Triggers diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml index bd8a46a..4989f93 100644 --- a/Monitor/Pages/SettingsGeneral.cshtml +++ b/Monitor/Pages/SettingsGeneral.cshtml @@ -48,24 +48,30 @@
- +
- +
- -
- @Model.PTMagicConfiguration.GeneralSettings.Application.Exchange -
+ +
+ +
@@ -77,16 +83,16 @@
- +
- @Model.PTMagicConfiguration.GetProfitTrailerServerAPITokenMasked() +
@@ -170,28 +176,21 @@
- +
- +
- @Model.PTMagicConfiguration.GeneralSettings.Monitor.Port +
- -
- @Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl -
-
- -
- +
diff --git a/Monitor/Pages/SettingsGeneral.cshtml.cs b/Monitor/Pages/SettingsGeneral.cshtml.cs index 5a031e3..d5f3c1e 100644 --- a/Monitor/Pages/SettingsGeneral.cshtml.cs +++ b/Monitor/Pages/SettingsGeneral.cshtml.cs @@ -70,19 +70,19 @@ namespace Monitor.Pages PTMagicConfiguration.GeneralSettings.Application.TestMode = HttpContext.Request.Form["Application_TestMode"].Equals("on"); PTMagicConfiguration.GeneralSettings.Application.StartBalance = SystemHelper.TextToDouble(HttpContext.Request.Form["Application_StartBalance"], PTMagicConfiguration.GeneralSettings.Application.StartBalance, "en-US"); PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerDefaultSettingName = HttpContext.Request.Form["Application_ProfitTrailerDefaultSettingName"]; - + PTMagicConfiguration.GeneralSettings.Application.Exchange = HttpContext.Request.Form["Application_Exchange"]; + PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL = HttpContext.Request.Form["Application_ProfitTrailerMonitorURL"]; + PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerServerAPIToken = HttpContext.Request.Form["Application_ProfitTrailerServerAPIToken"]; PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset = HttpContext.Request.Form["Application_TimezoneOffset"]; PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency = HttpContext.Request.Form["Application_MainFiatCurrency"]; - - PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Application_FloodProtectionMinutes"], PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes); PTMagicConfiguration.GeneralSettings.Application.InstanceName = HttpContext.Request.Form["Application_InstanceName"]; PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey = HttpContext.Request.Form["Application_CoinMarketCapAPIKey"]; PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey = HttpContext.Request.Form["Application_FreeCurrencyConverterAPIKey"]; - PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected = HttpContext.Request.Form["Monitor_IsPasswordProtected"].Equals("on"); PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart = HttpContext.Request.Form["Monitor_OpenBrowserOnStart"].Equals("on"); - PTMagicConfiguration.GeneralSettings.Monitor.DefaultDCAMode = HttpContext.Request.Form["Monitor_AnalyzerChart"]; + PTMagicConfiguration.GeneralSettings.Monitor.AnalyzerChart = HttpContext.Request.Form["Monitor_AnalyzerChart"]; + PTMagicConfiguration.GeneralSettings.Monitor.Port = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_Port"], PTMagicConfiguration.GeneralSettings.Monitor.Port); PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphIntervalMinutes"], PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes); PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphMaxTimeframeHours"], PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours); PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_RefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds); diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index cd50fc4..9bdb3b4 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -57,7 +57,7 @@ @if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) { @buyLogEntry.Market } else { - @buyLogEntry.Market + @buyLogEntry.Market   } @string.Format("{0}%", (buyLogEntry.PercChange * 100).ToString("#,#0.00")) @string.Format("{0}", (buyLogEntry.Volume24h).ToString()) @@ -98,10 +98,9 @@ 24H Cost - DCA - Sell - Target - Profit + DCA + Sell + Profit @@ -166,14 +165,15 @@ - + @if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) { @dcaLogEntry.Market } else { - @dcaLogEntry.Market + @dcaLogEntry.Market   + }
@@ -201,42 +201,32 @@ @Html.Raw(buyStrategyText) @Html.Raw(sellStrategyText) - - @if (!sellStrategyText.Contains("WATCHMODE")) - { - @if (sellStrategyText.Contains("CROSSED")) - // if leverage, recalculate profit target - { - string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("CROSSED")+9); - leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); - leverageValue = double.Parse(leverage); - } - @if (sellStrategyText.Contains("ISOLATED")) - { - string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("ISOLATED")+10); - leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); - leverageValue = double.Parse(leverage); - } - @if (leverageValue == 1) - { - @Html.Raw(dcaLogEntry.TargetGainValue.HasValue ? dcaLogEntry.TargetGainValue.Value.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%" : " ") - } - else - { - double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.Value; - @Html.Raw(dcaLogEntry.TargetGainValue.HasValue ? TargetGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%" : " ") - } - } - else - { - - } - + @if (!@lostValue) - { - profitPercentage = profitPercentage * leverageValue; - @profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% - } + { + @if (!sellStrategyText.Contains("WATCHMODE")) + { + @if (sellStrategyText.Contains("CROSSED")) + // if leverage, recalculate profit target + { + string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("CROSSED")+9); + leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); + leverageValue = double.Parse(leverage); + } + @if (sellStrategyText.Contains("ISOLATED")) + { + string leverageText = sellStrategyText.Remove(0, sellStrategyText.IndexOf("ISOLATED")+10); + leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); + leverageValue = double.Parse(leverage); + } + profitPercentage = profitPercentage * leverageValue; + double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.Value; + @TargetGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% +
+
@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
+ + } + } else { No Value! @@ -257,7 +247,6 @@ - @Html.Raw((((Model.TotalBagGain) / Model.TotalBagCost) * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))% diff --git a/Monitor/Pages/_get/SettingsSingleMarketSettings.cshtml b/Monitor/Pages/_get/SettingsSingleMarketSettings.cshtml index be75b87..d79702c 100644 --- a/Monitor/Pages/_get/SettingsSingleMarketSettings.cshtml +++ b/Monitor/Pages/_get/SettingsSingleMarketSettings.cshtml @@ -61,6 +61,21 @@
+
+ +
+ +
+
+ +
+ +
+ + Leave empty to allow all +
+
+
diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs index 94716b9..7e510b4 100644 --- a/PTMagic/Program.cs +++ b/PTMagic/Program.cs @@ -6,7 +6,7 @@ using Core.Helper; using Microsoft.Extensions.DependencyInjection; -[assembly: AssemblyVersion("2.5.7")] +[assembly: AssemblyVersion("2.5.11")] [assembly: AssemblyProduct("PT Magic")] namespace PTMagic diff --git a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json index db5f9c9..dcbd5bf 100644 --- a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json +++ b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json @@ -1,6 +1,7 @@ // // The settings below offer a basic example of some of the options available when using PTMagic. -// You should take your time and adjust these settings according to your own personal preferences. +// You should take your time and adjust these settings according to your own personal preferences, and settings. +// // Always test your PTMagic settings by running a Profit Trailer bot in TESTMODE, to make sure // it is performing as you expect. // @@ -10,21 +11,19 @@ { "AnalyzerSettings": { "MarketAnalyzer": { - "StoreDataMaxHours": 48, // Number of hours to store market data - "IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers - "ExcludeMainCurrency": true, // Excludes the main currency (for example BTC) from market trend analysis + "StoreDataMaxHours": 48, // Number of hours to store market data + "IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers + "ExcludeMainCurrency": true, // Excludes the main currency (for example BTC) from market trend analysis "MarketTrends": [ { - "Name": "1h", // UNIQUE market trend name (to be referenced by your triggers below) - "Platform": "Exchange", // Platform to grab prices from (Allowed values are: CoinMarketCap, Exchange) - "MaxMarkets": 50, // Number of markets/pairs to analyze sorted by 24h volume - "TrendMinutes": 60, // Number of minutes to build a trend (1440 = 24h, 720 = 12h, 60 = 1h) - "TrendCurrency": "Market", // Trend Currency to build the trend against. If set to "Fiat", the trend will - // take the USD value of your main currency into account to build the trend. - // "Market" will build a trend against your base currency, such as BTC or USDT. - "TrendThreshold": 15, // Any coin that is above 15% or below -15% for this timeframe will not be used when calculating the market average. - "DisplayGraph": false, // Use this trend in the graph on the PTM Monitor dashboard and market analyzer - "DisplayOnMarketAnalyzerList": false // Disply this trend for all coins on the PTM Monitor market analyzer + "Name": "1h", // UNIQUE market trend name (to be referenced by your triggers below) + "Platform": "Exchange", // Platform to grab prices from (Allowed values are: CoinMarketCap, Exchange) + "MaxMarkets": 50, // Number of markets/pairs to analyze sorted by 24h volume + "TrendMinutes": 60, // Number of minutes to build a trend (1440 = 24h, 720 = 12h, 60 = 1h) + "TrendCurrency": "Market", // Trend Currency to build the trend against. If set to "Fiat", the trend will take the USD value of your main currency into account to build the trend. "Market" will build a trend against your base currency, such as BTC or USDT. + "TrendThreshold": 15, // Any coin that is above 15% or below -15% for this timeframe will not be used when calculating the market average. + "DisplayGraph": false, // Use this trend in the graph on the PTM Monitor dashboard and market analyzer? + "DisplayOnMarketAnalyzerList": false // Disply this trend on the PTM Monitor market analyzer? }, { "Name": "6h", @@ -33,8 +32,8 @@ "TrendMinutes": 360, "TrendCurrency": "Market", "TrendThreshold": 30, - "DisplayGraph": true, - "DisplayOnMarketAnalyzerList": true + "DisplayGraph": true, + "DisplayOnMarketAnalyzerList": true }, { "Name": "12h", @@ -43,8 +42,8 @@ "TrendMinutes": 720, "TrendCurrency": "Market", "TrendThreshold": 50, - "DisplayGraph": true, - "DisplayOnMarketAnalyzerList": true + "DisplayGraph": true, + "DisplayOnMarketAnalyzerList": true }, { "Name": "24h", @@ -53,24 +52,24 @@ "TrendMinutes": 1440, "TrendCurrency": "Market", "TrendThreshold": 75, - "DisplayGraph": true, - "DisplayOnMarketAnalyzerList": true + "DisplayGraph": true, + "DisplayOnMarketAnalyzerList": true } ] }, // ================================ GLOBAL SETTINGS ================================ // "GlobalSettings": [ // Global settings for Profit Trailer properties - // - // =================================================================================== - // ----------------------------- + // + // =================================================================================== + // ----------------------------- { - "SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting - "TriggerConnection": "AND", // Define if triggers will be connected by AND or OR - "Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above + "SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting + "TriggerConnection": "AND", // Define if triggers will be connected by AND or OR + "Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above { - "MarketTrendName": "1h", // Reference to the market trend specified above - "MaxChange": 0 // The maximum value for this trigger to be true. (Any value below "0" will trigger this) + "MarketTrendName": "1h", // Reference to the market trend specified above + "MaxChange": 0 // The maximum value for this trigger to be true. (Any value below "0" will trigger this) }, { "MarketTrendName": "12h", @@ -81,17 +80,19 @@ "MaxChange": -5 } ], - "PairsProperties": { // Properties for PAIRS.PROPERTIES - // Any valid setting from https://wiki.profittrailer.com/en/config can be used here. - // You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting. + "PairsProperties": { // Changes you wish to make to your PAIRS.properties settings + // Any valid setting from https://wiki.profittrailer.com/en/config can be used here. + // You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting. "DEFAULT_sell_only_mode_enabled": true, "DEFAULT_trailing_profit_OFFSETPERCENT": -50 }, - "DCAProperties": { // Properties for DCA.PROPERTIES + "DCAProperties": { // Changes you wish to make to your DCA.properties settings "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -75 + }, + "IndicatorsProperties": { // Changes you wish to make to your INDICATORS.properties settings } }, - // ----------------------------- + // ----------------------------- { "SettingName": "TankingDown", "TriggerConnection": "AND", @@ -99,34 +100,25 @@ { "MarketTrendName": "1h", "MaxChange": 0 - }, - { - "MarketTrendName": "12h", - "MaxChange": 0 - }, - { - "MarketTrendName": "24h", // Any value between -5 and -3 will make this trigger true. - "MaxChange": -3, - "MinChange": -5 // The minimum value for this trigger to be true. (Any value above "-5" will trigger this) } ], "PairsProperties": { - "max_trading_pairs_OFFSET": -2, - "DEFAULT_min_buy_volume_OFFSETPERCENT": 100, - //"DEFAULT_initial_cost_OFFSETPERCENT": -50, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50, - "DEFAULT_trailing_buy_OFFSETPERCENT": 25, - "DEFAULT_trailing_profit_OFFSETPERCENT": -25 + "max_trading_pairs_OFFSET": -2, + "DEFAULT_min_buy_volume_OFFSETPERCENT": 100, + //"DEFAULT_initial_cost_OFFSETPERCENT": -50, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50, + "DEFAULT_trailing_buy_OFFSETPERCENT": 25, + "DEFAULT_trailing_profit_OFFSETPERCENT": -25 }, "DCAProperties": { //"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100, "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25, - "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50 + "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50 }, - "IndicatorsProperties": { + "IndicatorsProperties": { } }, - // ----------------------------- + // ----------------------------- { "SettingName": "BearSighted", "TriggerConnection": "AND", @@ -147,16 +139,16 @@ ], "PairsProperties": { "max_trading_pairs_OFFSET": -1, - //"DEFAULT_initial_cost_OFFSETPERCENT": -25, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25, - "DEFAULT_trailing_buy_OFFSETPERCENT": 10, - "DEFAULT_trailing_profit_OFFSETPERCENT": -10 + //"DEFAULT_initial_cost_OFFSETPERCENT": -25, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25, + "DEFAULT_trailing_buy_OFFSETPERCENT": 10, + "DEFAULT_trailing_profit_OFFSETPERCENT": -10 }, "DCAProperties": { "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10, - "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10, + "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10, }, - "IndicatorsProperties": { + "IndicatorsProperties": { } }, // ----------------------------- @@ -180,19 +172,19 @@ ], "PairsProperties": { "max_trading_pairs_OFFSET": 1, - //"DEFAULT_initial_cost_OFFSETPERCENT": 10, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10, - "DEFAULT_trailing_buy_OFFSETPERCENT": -10, - "DEFAULT_A_sell_value_OFFSETPERCENT": 10 + //"DEFAULT_initial_cost_OFFSETPERCENT": 10, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10, + "DEFAULT_trailing_buy_OFFSETPERCENT": -10, + "DEFAULT_A_sell_value_OFFSETPERCENT": 10 }, "DCAProperties": { - "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10, - "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10, + "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10, + "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10, }, - "IndicatorsProperties": { + "IndicatorsProperties": { } }, - // ----------------------------- + // ----------------------------- { "SettingName": "ToTheMoon", "TriggerConnection": "AND", @@ -212,8 +204,8 @@ ], "PairsProperties": { "max_trading_pairs_OFFSET": 2, - //"DEFAULT_initial_cost_OFFSETPERCENT": 20, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20, + //"DEFAULT_initial_cost_OFFSETPERCENT": 20, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20, "DEFAULT_trailing_buy_OFFSETPERCENT": -10, "DEFAULT_A_sell_value_OFFSETPERCENT": 20 }, @@ -221,7 +213,7 @@ "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20, "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20, }, - "IndicatorsProperties": { + "IndicatorsProperties": { } }, // ----------------------------- @@ -238,36 +230,25 @@ } } ], + // // ================================ COIN-SPECIFIC SETTINGS ================================ // - "SingleMarketSettings": [ // Single market/pair settings for Profit Trailer properties - // Any setting from https://wiki.profittrailer.com/doku.php?id=pairs.properties - // marked as CS (coin-specific) can be used here. - // Only coins that meet the triggered conditions will have the settings applied. - { - "SettingName": "BlacklistCoins", - "StopProcessWhenTriggered": true, - "Triggers": [ - { - "AgeDaysLowerThan": 21 - } - ], - "PairsProperties": { - "DEFAULT_trading_enabled": false, - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false - } - }, - // ----------------------------- + "SingleMarketSettings": [ // Single market/pair settings for Profit Trailer properties + // Any setting from https://wiki.profittrailer.com/en/config marked as COIN (coin-specific) can be used here. + // Only coins that meet the triggered conditions will have the settings applied. + // A variety of SMS can be employed to check for long-term down trends, sideways trends, over-extended uptrends, etc. + // If more than one SMS is true, the settings of the last applied SMS over-rides any prior SMS { "SettingName": "PumpNDumpProtection", "TriggerConnection": "OR", + //"StopProcessWhenTriggered": true, // No SMS after this will be analyzed or applied if this SMS is true + //"AllowedGlobalSettings": "Default", // You can specify that this setting will only apply when a specific Global setting is active + //"IgnoredGlobalSettings": "Default", // You can specify that this setting will NOT apply when a specific Global setting is active "Triggers": [ { "MarketTrendName": "1h", - "MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = Single market - // trend compared relative to the market trend - // Absolute = Single market trend viewed on its own + "MarketTrendRelation": "Relative", // Relative = The single market trend is compared to the overall trend of the entire market + // Absolute = The Single market trend is considered on its own "MinChange": 8 }, { @@ -281,18 +262,17 @@ "MinChange": 12 } ], - "OffTriggers": [ - { - "HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting - // for 3 hours, since the last time it triggered. + "OffTriggers": [ + { + "HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting + // for 3 hours, since the last time it triggered. } ], "PairsProperties": { - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false + "DEFAULT_sell_only_mode_enabled": "true", + "DEFAULT_DCA_enabled": "false" } }, - // ----------------------------- { "SettingName": "FreefallBlock", "TriggerConnection": "OR", @@ -303,14 +283,14 @@ "MaxChange": -5 } ], - "OffTriggers": [ - { + "OffTriggers": [ + { "HoursSinceTriggered": 1 } ], - "PairsProperties": { - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false + "PairsProperties": { + "DEFAULT_sell_only_mode_enabled": "true", + "DEFAULT_DCA_enabled": "false" } } ] diff --git a/_Development/DevSettings/settings.analyzer.json b/_Development/DevSettings/settings.analyzer.json index baf14ff..dcbd5bf 100644 --- a/_Development/DevSettings/settings.analyzer.json +++ b/_Development/DevSettings/settings.analyzer.json @@ -1,6 +1,7 @@ // // The settings below offer a basic example of some of the options available when using PTMagic. -// You should take your time and adjust these settings according to your own personal preferences. +// You should take your time and adjust these settings according to your own personal preferences, and settings. +// // Always test your PTMagic settings by running a Profit Trailer bot in TESTMODE, to make sure // it is performing as you expect. // @@ -10,21 +11,19 @@ { "AnalyzerSettings": { "MarketAnalyzer": { - "StoreDataMaxHours": 48, // Number of hours to store market data - "IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers - "ExcludeMainCurrency": true, // Excludes the main currency (for example BTC) from market trend analysis + "StoreDataMaxHours": 48, // Number of hours to store market data + "IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers + "ExcludeMainCurrency": true, // Excludes the main currency (for example BTC) from market trend analysis "MarketTrends": [ { - "Name": "1h", // UNIQUE market trend name (to be referenced by your triggers below) - "Platform": "Exchange", // Platform to grab prices from (Allowed values are: CoinMarketCap, Exchange) - "MaxMarkets": 50, // Number of markets/pairs to analyze sorted by 24h volume - "TrendMinutes": 60, // Number of minutes to build a trend (1440 = 24h, 720 = 12h, 60 = 1h) - "TrendCurrency": "Market", // Trend Currency to build the trend against. If set to "Fiat", the trend will - // take the USD value of your main currency into account to build the trend. - // "Market" will build a trend against your base currency, such as BTC or USDT. - "TrendThreshold": 15, // Any coin that is above 15% or below -15% for this timeframe will not be used when calculating the market average. - "DisplayGraph": false, // Use this trend in the graph on the PTM Monitor dashboard and market analyzer - "DisplayOnMarketAnalyzerList": false // Disply this trend for all coins on the PTM Monitor market analyzer + "Name": "1h", // UNIQUE market trend name (to be referenced by your triggers below) + "Platform": "Exchange", // Platform to grab prices from (Allowed values are: CoinMarketCap, Exchange) + "MaxMarkets": 50, // Number of markets/pairs to analyze sorted by 24h volume + "TrendMinutes": 60, // Number of minutes to build a trend (1440 = 24h, 720 = 12h, 60 = 1h) + "TrendCurrency": "Market", // Trend Currency to build the trend against. If set to "Fiat", the trend will take the USD value of your main currency into account to build the trend. "Market" will build a trend against your base currency, such as BTC or USDT. + "TrendThreshold": 15, // Any coin that is above 15% or below -15% for this timeframe will not be used when calculating the market average. + "DisplayGraph": false, // Use this trend in the graph on the PTM Monitor dashboard and market analyzer? + "DisplayOnMarketAnalyzerList": false // Disply this trend on the PTM Monitor market analyzer? }, { "Name": "6h", @@ -65,12 +64,12 @@ // =================================================================================== // ----------------------------- { - "SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting - "TriggerConnection": "AND", // Define if triggers will be connected by AND or OR - "Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above + "SettingName": "EndOfTheWorld", // ANY UNIQUE name of your setting + "TriggerConnection": "AND", // Define if triggers will be connected by AND or OR + "Triggers": [ // Your triggers for this setting. You can use any of your defined trends from above { - "MarketTrendName": "1h", // Reference to the market trend specified above - "MaxChange": 0 // The maximum value for this trigger to be true. (Any value below "0" will trigger this) + "MarketTrendName": "1h", // Reference to the market trend specified above + "MaxChange": 0 // The maximum value for this trigger to be true. (Any value below "0" will trigger this) }, { "MarketTrendName": "12h", @@ -81,14 +80,16 @@ "MaxChange": -5 } ], - "PairsProperties": { // Properties for PAIRS.PROPERTIES - // Any valid setting from https://wiki.profittrailer.com/en/config can be used here. - // You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting. + "PairsProperties": { // Changes you wish to make to your PAIRS.properties settings + // Any valid setting from https://wiki.profittrailer.com/en/config can be used here. + // You can use a specific value, or apply a discrete OFFSET or OFFSETPERCENT to the value in your default PAIRS setting. "DEFAULT_sell_only_mode_enabled": true, "DEFAULT_trailing_profit_OFFSETPERCENT": -50 }, - "DCAProperties": { // Properties for DCA.PROPERTIES + "DCAProperties": { // Changes you wish to make to your DCA.properties settings "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -75 + }, + "IndicatorsProperties": { // Changes you wish to make to your INDICATORS.properties settings } }, // ----------------------------- @@ -99,24 +100,15 @@ { "MarketTrendName": "1h", "MaxChange": 0 - }, - { - "MarketTrendName": "12h", - "MaxChange": 0 - }, - { - "MarketTrendName": "24h", // Any value between -5 and -3 will make this trigger true. - "MaxChange": -3, - "MinChange": -5 // The minimum value for this trigger to be true. (Any value above "-5" will trigger this) } ], "PairsProperties": { - "max_trading_pairs_OFFSET": -2, - "DEFAULT_min_buy_volume_OFFSETPERCENT": 100, - //"DEFAULT_initial_cost_OFFSETPERCENT": -50, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50, - "DEFAULT_trailing_buy_OFFSETPERCENT": 25, - "DEFAULT_trailing_profit_OFFSETPERCENT": -25 + "max_trading_pairs_OFFSET": -2, + "DEFAULT_min_buy_volume_OFFSETPERCENT": 100, + //"DEFAULT_initial_cost_OFFSETPERCENT": -50, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50, + "DEFAULT_trailing_buy_OFFSETPERCENT": 25, + "DEFAULT_trailing_profit_OFFSETPERCENT": -25 }, "DCAProperties": { //"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100, @@ -149,8 +141,8 @@ "max_trading_pairs_OFFSET": -1, //"DEFAULT_initial_cost_OFFSETPERCENT": -25, //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25, - "DEFAULT_trailing_buy_OFFSETPERCENT": 10, - "DEFAULT_trailing_profit_OFFSETPERCENT": -10 + "DEFAULT_trailing_buy_OFFSETPERCENT": 10, + "DEFAULT_trailing_profit_OFFSETPERCENT": -10 }, "DCAProperties": { "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10, @@ -180,13 +172,13 @@ ], "PairsProperties": { "max_trading_pairs_OFFSET": 1, - //"DEFAULT_initial_cost_OFFSETPERCENT": 10, - //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10, - "DEFAULT_trailing_buy_OFFSETPERCENT": -10, - "DEFAULT_A_sell_value_OFFSETPERCENT": 10 + //"DEFAULT_initial_cost_OFFSETPERCENT": 10, + //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10, + "DEFAULT_trailing_buy_OFFSETPERCENT": -10, + "DEFAULT_A_sell_value_OFFSETPERCENT": 10 }, "DCAProperties": { - "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10, + "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10, "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10, }, "IndicatorsProperties": { @@ -219,7 +211,7 @@ }, "DCAProperties": { "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20, - "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20, + "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20, }, "IndicatorsProperties": { } @@ -238,36 +230,25 @@ } } ], + // // ================================ COIN-SPECIFIC SETTINGS ================================ // - "SingleMarketSettings": [ // Single market/pair settings for Profit Trailer properties - // Any setting from https://wiki.profittrailer.com/en/config - // marked as CS (coin-specific) can be used here. - // Only coins that meet the triggered conditions will have the settings applied. - { - "SettingName": "BlacklistCoins", - "StopProcessWhenTriggered": true, - "Triggers": [ - { - "AgeDaysLowerThan": 21 - } - ], - "PairsProperties": { - "DEFAULT_trading_enabled": false, - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false - } - }, - // ----------------------------- + "SingleMarketSettings": [ // Single market/pair settings for Profit Trailer properties + // Any setting from https://wiki.profittrailer.com/en/config marked as COIN (coin-specific) can be used here. + // Only coins that meet the triggered conditions will have the settings applied. + // A variety of SMS can be employed to check for long-term down trends, sideways trends, over-extended uptrends, etc. + // If more than one SMS is true, the settings of the last applied SMS over-rides any prior SMS { "SettingName": "PumpNDumpProtection", "TriggerConnection": "OR", + //"StopProcessWhenTriggered": true, // No SMS after this will be analyzed or applied if this SMS is true + //"AllowedGlobalSettings": "Default", // You can specify that this setting will only apply when a specific Global setting is active + //"IgnoredGlobalSettings": "Default", // You can specify that this setting will NOT apply when a specific Global setting is active "Triggers": [ { "MarketTrendName": "1h", - "MarketTrendRelation": "Relative", // The relation of the single market trend. Relative = Single market - // trend compared relative to the market trend - // Absolute = Single market trend viewed on its own + "MarketTrendRelation": "Relative", // Relative = The single market trend is compared to the overall trend of the entire market + // Absolute = The Single market trend is considered on its own "MinChange": 8 }, { @@ -283,16 +264,15 @@ ], "OffTriggers": [ { - "HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting - // for 3 hours, since the last time it triggered. + "HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting + // for 3 hours, since the last time it triggered. } ], "PairsProperties": { - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false + "DEFAULT_sell_only_mode_enabled": "true", + "DEFAULT_DCA_enabled": "false" } }, - // ----------------------------- { "SettingName": "FreefallBlock", "TriggerConnection": "OR", @@ -309,8 +289,8 @@ } ], "PairsProperties": { - "DEFAULT_sell_only_mode_enabled": true, - "DEFAULT_DCA_enabled": false + "DEFAULT_sell_only_mode_enabled": "true", + "DEFAULT_DCA_enabled": "false" } } ]