From 8872d5334239688892169f156dc26d9dab05977a Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 3 Mar 2021 13:23:05 +0900
Subject: [PATCH 02/26] increment version
---
PTMagic/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs
index 94716b9..6139695 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.8")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic
From 6db6d28e8a857ca08c80f946c84de72eebd9a875 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 3 Mar 2021 13:50:21 +0900
Subject: [PATCH 03/26] SMS allowed/ignored save
---
Monitor/Pages/SettingsAnalyzer.cshtml.cs | 2 ++
1 file changed, 2 insertions(+)
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
From 76fc12e3a72fab607ee1a6daa309772874410d43 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 3 Mar 2021 15:23:42 +0900
Subject: [PATCH 04/26] age tweaks
---
Core/Helper/SystemHelper.cs | 8 ++++----
Monitor/Pages/_get/DashboardTop.cshtml | 7 ++++---
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs
index 80d9b83..60845b1 100644
--- a/Core/Helper/SystemHelper.cs
+++ b/Core/Helper/SystemHelper.cs
@@ -470,15 +470,15 @@ namespace Core.Helper
result += hours.ToString() + "h";
}
- if (minutes > 0)
+ if ((days == 0) && (minutes > 0))
{
- if (hours > 0 || days > 0) result += " ";
+ if (hours > 0) result += " ";
result += minutes.ToString() + "m";
}
- if ((!shortOutput && seconds > 0) || (shortOutput && days == 0))
+ if ((hours == 0) && (seconds > 0))
{
- if (minutes > 0 || hours > 0 || days > 0) result += " ";
+ if (minutes > 0) result += " ";
result += seconds.ToString() + "s";
}
diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml
index cd50fc4..80d5569 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) {
-
+ |
@if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0)
{
@dcaLogEntry.Market
} else
{
- @dcaLogEntry.Market
+ @dcaLogEntry.Market
+
}
From f273d717083954a0c8bce081adabfeb6591ecbf0 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 3 Mar 2021 22:33:51 +0900
Subject: [PATCH 05/26] age logic error
---
Core/Helper/SystemHelper.cs | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs
index 60845b1..4b71bef 100644
--- a/Core/Helper/SystemHelper.cs
+++ b/Core/Helper/SystemHelper.cs
@@ -470,17 +470,28 @@ namespace Core.Helper
result += hours.ToString() + "h";
}
- if ((days == 0) && (minutes > 0))
+ if (minutes > 0)
{
- if (hours > 0) result += " ";
- result += minutes.ToString() + "m";
+ if (
+ (days == 0) ||
+ (days > 0 && hours == 0)
+ )
+ {
+ result += " ";
+ result += minutes.ToString() + "m";
+ }
}
- if ((hours == 0) && (seconds > 0))
+ if (
+ (days == 0 && hours == 0) ||
+ (days > 0 && hours == 0 && minutes == 0) ||
+ (days == 0 && hours > 0 && minutes == 0)
+ )
{
- if (minutes > 0) result += " ";
+ result += " ";
result += seconds.ToString() + "s";
}
+
return result;
}
From b08d4dac0cf1329c4bad1ca7dd92cee8f1ba358f Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Thu, 4 Mar 2021 01:35:11 +0900
Subject: [PATCH 06/26] code formatting
---
Core/Helper/SystemHelper.cs | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs
index 4b71bef..9687e39 100644
--- a/Core/Helper/SystemHelper.cs
+++ b/Core/Helper/SystemHelper.cs
@@ -472,21 +472,14 @@ namespace Core.Helper
if (minutes > 0)
{
- if (
- (days == 0) ||
- (days > 0 && hours == 0)
- )
+ if (days == 0 || (days > 0 && hours == 0))
{
result += " ";
result += minutes.ToString() + "m";
}
}
- if (
- (days == 0 && hours == 0) ||
- (days > 0 && hours == 0 && minutes == 0) ||
- (days == 0 && hours > 0 && minutes == 0)
- )
+ if ((days == 0 && hours == 0) || (days > 0 && hours == 0 && minutes == 0) || (days == 0 && hours > 0 && minutes == 0))
{
result += " ";
result += seconds.ToString() + "s";
From ace96a632bf6c561a24cf5a0c87fdb24d37c6d5e Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Thu, 25 Mar 2021 22:34:53 +0900
Subject: [PATCH 07/26] Ignored/Allowed in SMS
---
Core/Main/PTMagic.cs | 4 ++--
Core/MarketAnalyzer/BinanceFutures.cs | 5 +----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index c585351..4caa49a 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1518,7 +1518,7 @@ namespace Core.Main
// Check ignore markets
List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredMarkets, ",");
- if (ignoredMarkets.Contains(marketPair))
+ if (ignoredMarkets.Any(marketPair.Contains))
{
this.Log.DoLogDebug("'" + marketPair + "' - Is ignored in '" + marketSetting.SettingName + "'.");
continue;
@@ -1526,7 +1526,7 @@ namespace Core.Main
// Check allowed markets
List allowedMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.AllowedMarkets, ",");
- if (allowedMarkets.Count > 0 && !allowedMarkets.Contains(marketPair))
+ if (allowedMarkets.Count > 0 && !allowedMarkets.Any(marketPair.Contains))
{
this.Log.DoLogDebug("'" + marketPair + "' - Is not allowed in '" + marketSetting.SettingName + "'.");
continue;
diff --git a/Core/MarketAnalyzer/BinanceFutures.cs b/Core/MarketAnalyzer/BinanceFutures.cs
index de1f962..1ba75a6 100644
--- a/Core/MarketAnalyzer/BinanceFutures.cs
+++ b/Core/MarketAnalyzer/BinanceFutures.cs
@@ -74,9 +74,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
@@ -100,7 +98,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);
From 46ce12bd48653b31a07f57e298f48b92c14f6110 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Mon, 29 Mar 2021 01:46:33 +0900
Subject: [PATCH 08/26] Ignored/Allowed changes
---
Core/Main/PTMagic.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 4caa49a..233a625 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1526,7 +1526,7 @@ namespace Core.Main
// Check allowed markets
List allowedMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.AllowedMarkets, ",");
- if (allowedMarkets.Count > 0 && !allowedMarkets.Any(marketPair.Contains))
+ if (allowedMarkets.Count > 0 && !allowedMarkets.Any(am => marketPair.StartsWith(am, StringComparison.InvariantCultureIgnoreCase)))
{
this.Log.DoLogDebug("'" + marketPair + "' - Is not allowed in '" + marketSetting.SettingName + "'.");
continue;
@@ -1534,7 +1534,7 @@ namespace Core.Main
// Check ignore global settings
List ignoredGlobalSettings = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredGlobalSettings, ",");
- if (ignoredGlobalSettings.Contains(this.ActiveSettingName))
+ if (ignoredMarkets.Any(im => marketPair.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
{
this.Log.DoLogDebug("'" + marketPair + "' - '" + this.ActiveSettingName + "' - Is ignored in '" + marketSetting.SettingName + "'.");
continue;
From 01aa86c076d3208b8846c9d6aba952c124710ae7 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Mon, 29 Mar 2021 02:31:25 +0900
Subject: [PATCH 09/26] BinanceFutures Quarterly Ignore
---
Core/Main/PTMagic.cs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 233a625..27b8baf 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -903,6 +903,30 @@ namespace Core.Main
// Check for single market trend triggers
this.ApplySingleMarketSettings();
+ // Ignore quarterly futures
+ if (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("BinanceFutures", StringComparison.InvariantCultureIgnoreCase))
+ {
+ var quarterlyFuturesLines = new Dictionary();
+
+ // Find all quarterly futures pairs
+ var results = this.MarketList.FindAll(m => m.Contains("_", StringComparison.InvariantCultureIgnoreCase));
+
+ // Create the settings lines to disable trading
+ if (results.Count > 0)
+ {
+ this.PairsLines.AddRange(new string[] {
+ "",
+ "# BinanceFutures Quarterly Contracts - Ignore list:",
+ "###################################################"
+ });
+
+ foreach (var marketPair in results)
+ {
+ this.PairsLines.Add(String.Format("{0}_trading_enabled = false", marketPair));
+ }
+ }
+ }
+
// Save new properties to Profit Trailer
this.SaveProfitTrailerProperties();
From 458b51898db50b85bf1f6a052a2892b77de39799 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Mon, 29 Mar 2021 03:03:23 +0900
Subject: [PATCH 10/26] Remove unnecessary line
---
Core/Main/PTMagic.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 27b8baf..fbd5395 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -906,8 +906,6 @@ namespace Core.Main
// Ignore quarterly futures
if (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("BinanceFutures", StringComparison.InvariantCultureIgnoreCase))
{
- var quarterlyFuturesLines = new Dictionary();
-
// Find all quarterly futures pairs
var results = this.MarketList.FindAll(m => m.Contains("_", StringComparison.InvariantCultureIgnoreCase));
From d829d5a99145b0d3d9fabdff4b354533ca5be804 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Mon, 29 Mar 2021 15:08:37 +0900
Subject: [PATCH 11/26] Fixed incorrect line change
---
Core/Main/PTMagic.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index fbd5395..6dcf6e1 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1540,7 +1540,7 @@ namespace Core.Main
// Check ignore markets
List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredMarkets, ",");
- if (ignoredMarkets.Any(marketPair.Contains))
+ if (ignoredMarkets.Any(im => marketPair.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
{
this.Log.DoLogDebug("'" + marketPair + "' - Is ignored in '" + marketSetting.SettingName + "'.");
continue;
@@ -1556,7 +1556,7 @@ namespace Core.Main
// Check ignore global settings
List ignoredGlobalSettings = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredGlobalSettings, ",");
- if (ignoredMarkets.Any(im => marketPair.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
+ if (ignoredGlobalSettings.Contains(this.ActiveSettingName))
{
this.Log.DoLogDebug("'" + marketPair + "' - '" + this.ActiveSettingName + "' - Is ignored in '" + marketSetting.SettingName + "'.");
continue;
From 7906ac29eb8bb05736a32d3d4cf0451e7ed76cd7 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Mon, 29 Mar 2021 16:07:44 +0900
Subject: [PATCH 12/26] Ignored/Allowed substring for Market Trends
---
Core/MarketAnalyzer/BaseAnalyzer.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs
index 51b2628..00d784b 100644
--- a/Core/MarketAnalyzer/BaseAnalyzer.cs
+++ b/Core/MarketAnalyzer/BaseAnalyzer.cs
@@ -311,13 +311,13 @@ namespace Core.MarketAnalyzer
if (recentMarkets.TryGetValue(recentMarketPair.Key, out recentMarket))
{
List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketTrend.IgnoredMarkets, ",");
- if (ignoredMarkets.Contains(recentMarketPair.Value.Symbol))
+ if (ignoredMarkets.Any(im => recentMarketPair.Value.Symbol.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
{
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))
+ if (allowedMarkets.Count > 0 && !allowedMarkets.Any(am => recentMarketPair.Value.Symbol.StartsWith(am, StringComparison.InvariantCultureIgnoreCase)))
{
log.DoLogDebug(platform + " - Market trend '" + marketTrend.Name + "' for '" + recentMarketPair.Key + "' is not allowed in this trend.");
continue;
From 10eac6586afebc9ba0b54fe02ac53bf40941a540 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Tue, 30 Mar 2021 14:30:17 +0900
Subject: [PATCH 13/26] TrendThreshold Display
---
Monitor/Pages/MarketAnalyzer.cshtml | 37 +++++++++++++++--------------
1 file changed, 19 insertions(+), 18 deletions(-)
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++) {
From 7ae2e5efddf6e3f6906da7839a08c79ca630b0f4 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Tue, 30 Mar 2021 15:15:25 +0900
Subject: [PATCH 14/26] Binance API throttle
---
Core/MarketAnalyzer/Binance.cs | 6 +++---
Core/MarketAnalyzer/BinanceFutures.cs | 4 ++--
PTMagic/Program.cs | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Core/MarketAnalyzer/Binance.cs b/Core/MarketAnalyzer/Binance.cs
index 8eae0a7..b2e6c68 100644
--- a/Core/MarketAnalyzer/Binance.cs
+++ b/Core/MarketAnalyzer/Binance.cs
@@ -364,12 +364,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 1ba75a6..52b99e2 100644
--- a/Core/MarketAnalyzer/BinanceFutures.cs
+++ b/Core/MarketAnalyzer/BinanceFutures.cs
@@ -361,11 +361,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/PTMagic/Program.cs b/PTMagic/Program.cs
index 6139695..fbebbf2 100644
--- a/PTMagic/Program.cs
+++ b/PTMagic/Program.cs
@@ -6,7 +6,7 @@ using Core.Helper;
using Microsoft.Extensions.DependencyInjection;
-[assembly: AssemblyVersion("2.5.8")]
+[assembly: AssemblyVersion("2.5.9")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic
From ab294a3a3c41ee126ab5a9b58b27f02001cf046e Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Tue, 30 Mar 2021 15:34:05 +0900
Subject: [PATCH 15/26] CMC API key message
---
Core/Main/PTMagic.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 6dcf6e1..d79e993 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -716,7 +716,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
@@ -726,7 +726,7 @@ 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)
@@ -1234,7 +1234,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))
From 15fc61a2426b0de4f09424763ec0eeb2a7790c0d Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Tue, 30 Mar 2021 23:29:49 +0900
Subject: [PATCH 16/26] ignored/allowed precise match
---
Core/Main/PTMagic.cs | 46 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 5 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index d79e993..3c5e3a8 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1525,12 +1525,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
@@ -1539,16 +1549,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.IgnoredMarkets.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;
From 1693b00cf48dada0b3f039cc331fb505593ad329 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Tue, 30 Mar 2021 23:39:27 +0900
Subject: [PATCH 17/26] Market trends ignore/allowed
---
Core/MarketAnalyzer/BaseAnalyzer.cs | 43 ++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs
index 00d784b..4f0ff6d 100644
--- a/Core/MarketAnalyzer/BaseAnalyzer.cs
+++ b/Core/MarketAnalyzer/BaseAnalyzer.cs
@@ -308,16 +308,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.Any(im => recentMarketPair.Value.Symbol.StartsWith(im, StringComparison.InvariantCultureIgnoreCase)))
+ // 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.Any(am => recentMarketPair.Value.Symbol.StartsWith(am, StringComparison.InvariantCultureIgnoreCase)))
+ // 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;
From f3568fa7bf838ddda62444a916ee4e910802f4e1 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 31 Mar 2021 00:02:06 +0900
Subject: [PATCH 18/26] typo
---
Core/Main/PTMagic.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 3c5e3a8..9600417 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1572,7 +1572,7 @@ namespace Core.Main
// Check allowed markets
// Strip main markets from list, if exists
- string allowed = marketSetting.IgnoredMarkets.ToUpper();
+ string allowed = marketSetting.AllowedMarkets.ToUpper();
allowed = allowed.Replace(mainMarket, "");
switch (this.PTMagicConfiguration.GeneralSettings.Application.Exchange.ToLower())
{
From 2cd76014bb013930086590b70c3dd551521e296c Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sat, 10 Apr 2021 12:22:24 +0900
Subject: [PATCH 19/26] Poloniex allowed markets
---
Core/MarketAnalyzer/BaseAnalyzer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs
index 4f0ff6d..ea9c210 100644
--- a/Core/MarketAnalyzer/BaseAnalyzer.cs
+++ b/Core/MarketAnalyzer/BaseAnalyzer.cs
@@ -316,7 +316,7 @@ namespace Core.MarketAnalyzer
market = market.Replace("-", "");
break;
case "poloniex":
- market = market.Replace("-", "");
+ market = market.Replace("_", "");
break;
}
if (recentMarkets.TryGetValue(recentMarketPair.Key, out recentMarket))
From d8bdc68f804c0551fb5ae5df840481848e7acb8c Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sat, 10 Apr 2021 12:23:01 +0900
Subject: [PATCH 20/26] increment version
---
PTMagic/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs
index fbebbf2..73e595d 100644
--- a/PTMagic/Program.cs
+++ b/PTMagic/Program.cs
@@ -6,7 +6,7 @@ using Core.Helper;
using Microsoft.Extensions.DependencyInjection;
-[assembly: AssemblyVersion("2.5.9")]
+[assembly: AssemblyVersion("2.5.10")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic
From a8278bae4d834b630567f432381424860250fd5a Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sat, 10 Apr 2021 12:31:22 +0900
Subject: [PATCH 21/26] poloniex ignored/allowed fix
---
Core/Main/PTMagic.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 9600417..7001425 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -1538,7 +1538,7 @@ namespace Core.Main
market = market.Replace("-", "");
break;
case "poloniex":
- market = market.Replace("-", "");
+ market = market.Replace("_", "");
break;
}
bool stopTriggers = false;
From 7010e5bf7a06e71b6393993f3e9332cd35a9c934 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Fri, 16 Apr 2021 12:26:31 +0900
Subject: [PATCH 22/26] fix missing quotes in default analyzer
---
.../settings.analyzer.json | 90 +++++++++----------
.../DevSettings/settings.analyzer.json | 50 +++++------
2 files changed, 70 insertions(+), 70 deletions(-)
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..d1b0744 100644
--- a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
+++ b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
@@ -11,20 +11,20 @@
"AnalyzerSettings": {
"MarketAnalyzer": {
"StoreDataMaxHours": 48, // Number of hours to store market data
- "IntervalMinutes": 2, // Interval in minutes for PTMagic to check market trends and triggers
+ "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
+ "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.
+ // 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
+ "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": "6h",
@@ -33,8 +33,8 @@
"TrendMinutes": 360,
"TrendCurrency": "Market",
"TrendThreshold": 30,
- "DisplayGraph": true,
- "DisplayOnMarketAnalyzerList": true
+ "DisplayGraph": true,
+ "DisplayOnMarketAnalyzerList": true
},
{
"Name": "12h",
@@ -43,8 +43,8 @@
"TrendMinutes": 720,
"TrendCurrency": "Market",
"TrendThreshold": 50,
- "DisplayGraph": true,
- "DisplayOnMarketAnalyzerList": true
+ "DisplayGraph": true,
+ "DisplayOnMarketAnalyzerList": true
},
{
"Name": "24h",
@@ -53,17 +53,17 @@
"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
@@ -84,14 +84,14 @@
"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.
- "DEFAULT_sell_only_mode_enabled": true,
+ "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_trailing_profit_OFFSETPERCENT": -50
},
"DCAProperties": { // Properties for DCA.PROPERTIES
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -75
}
},
- // -----------------------------
+ // -----------------------------
{
"SettingName": "TankingDown",
"TriggerConnection": "AND",
@@ -123,10 +123,10 @@
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50
},
- "IndicatorsProperties": {
+ "IndicatorsProperties": {
}
},
- // -----------------------------
+ // -----------------------------
{
"SettingName": "BearSighted",
"TriggerConnection": "AND",
@@ -156,7 +156,7 @@
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10,
},
- "IndicatorsProperties": {
+ "IndicatorsProperties": {
}
},
// -----------------------------
@@ -182,17 +182,17 @@
"max_trading_pairs_OFFSET": 1,
//"DEFAULT_initial_cost_OFFSETPERCENT": 10,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10,
- "DEFAULT_trailing_buy_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,
},
- "IndicatorsProperties": {
+ "IndicatorsProperties": {
}
},
- // -----------------------------
+ // -----------------------------
{
"SettingName": "ToTheMoon",
"TriggerConnection": "AND",
@@ -214,14 +214,14 @@
"max_trading_pairs_OFFSET": 2,
//"DEFAULT_initial_cost_OFFSETPERCENT": 20,
//"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
- "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
+ "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 20
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
},
- "IndicatorsProperties": {
+ "IndicatorsProperties": {
}
},
// -----------------------------
@@ -241,9 +241,9 @@
// ================================ 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.
+ // 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,
@@ -253,12 +253,12 @@
}
],
"PairsProperties": {
- "DEFAULT_trading_enabled": false,
- "DEFAULT_sell_only_mode_enabled": true,
- "DEFAULT_DCA_enabled": false
+ "DEFAULT_trading_enabled": "false",
+ "DEFAULT_sell_only_mode_enabled": "true",
+ "DEFAULT_DCA_enabled": "false"
}
},
- // -----------------------------
+ // -----------------------------
{
"SettingName": "PumpNDumpProtection",
"TriggerConnection": "OR",
@@ -266,8 +266,8 @@
{
"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
+ // trend compared relative to the market trend
+ // Absolute = Single market trend viewed on its own
"MinChange": 8
},
{
@@ -281,18 +281,18 @@
"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 +303,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..d1b0744 100644
--- a/_Development/DevSettings/settings.analyzer.json
+++ b/_Development/DevSettings/settings.analyzer.json
@@ -84,7 +84,7 @@
"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.
- "DEFAULT_sell_only_mode_enabled": true,
+ "DEFAULT_sell_only_mode_enabled": "true",
"DEFAULT_trailing_profit_OFFSETPERCENT": -50
},
"DCAProperties": { // Properties for DCA.PROPERTIES
@@ -112,16 +112,16 @@
],
"PairsProperties": {
"max_trading_pairs_OFFSET": -2,
- "DEFAULT_min_buy_volume_OFFSETPERCENT": 100,
- //"DEFAULT_initial_cost_OFFSETPERCENT": -50,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -50,
+ "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": {
}
@@ -147,14 +147,14 @@
],
"PairsProperties": {
"max_trading_pairs_OFFSET": -1,
- //"DEFAULT_initial_cost_OFFSETPERCENT": -25,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": -25,
+ //"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": {
}
@@ -180,14 +180,14 @@
],
"PairsProperties": {
"max_trading_pairs_OFFSET": 1,
- //"DEFAULT_initial_cost_OFFSETPERCENT": 10,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 10,
- "DEFAULT_trailing_buy_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_profit_OFFSETPERCENT": 10,
},
"IndicatorsProperties": {
}
@@ -212,14 +212,14 @@
],
"PairsProperties": {
"max_trading_pairs_OFFSET": 2,
- //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
- "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
+ //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
+ //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
+ "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 20
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
+ "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
},
"IndicatorsProperties": {
}
@@ -253,9 +253,9 @@
}
],
"PairsProperties": {
- "DEFAULT_trading_enabled": false,
- "DEFAULT_sell_only_mode_enabled": true,
- "DEFAULT_DCA_enabled": false
+ "DEFAULT_trading_enabled": "false",
+ "DEFAULT_sell_only_mode_enabled": "true",
+ "DEFAULT_DCA_enabled": "false"
}
},
// -----------------------------
@@ -267,7 +267,7 @@
"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
+ // Absolute = Single market trend viewed on its own
"MinChange": 8
},
{
@@ -284,12 +284,12 @@
"OffTriggers": [
{
"HoursSinceTriggered": 3 // Any coin that triggers this setting, will remain under this setting
- // for 3 hours, since the last time it triggered.
+ // 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"
}
},
// -----------------------------
@@ -309,8 +309,8 @@
}
],
"PairsProperties": {
- "DEFAULT_sell_only_mode_enabled": true,
- "DEFAULT_DCA_enabled": false
+ "DEFAULT_sell_only_mode_enabled": "true",
+ "DEFAULT_DCA_enabled": "false"
}
}
]
From c02b16b948e71d629ac07f59c8e9d4fa46624925 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 21 Apr 2021 15:33:07 +0900
Subject: [PATCH 23/26] Settings GUI changes
---
Core/Main/PTMagic.cs | 19 +++++++------
Monitor/Pages/SettingsGeneral.cshtml | 37 ++++++++++++-------------
Monitor/Pages/SettingsGeneral.cshtml.cs | 10 +++----
PTMagic/Program.cs | 2 +-
4 files changed, 35 insertions(+), 33 deletions(-)
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 7001425..29b198d 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -701,13 +701,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))
@@ -731,7 +731,7 @@ namespace Core.Main
}
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);
@@ -739,7 +739,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;
}
@@ -952,7 +952,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)
{
@@ -969,7 +969,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)
@@ -2194,9 +2194,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/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml
index bd8a46a..20f0d27 100644
--- a/Monitor/Pages/SettingsGeneral.cshtml
+++ b/Monitor/Pages/SettingsGeneral.cshtml
@@ -48,24 +48,30 @@
@@ -170,23 +176,16 @@
-
-
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/PTMagic/Program.cs b/PTMagic/Program.cs
index 73e595d..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.10")]
+[assembly: AssemblyVersion("2.5.11")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic
From 382df91de30c417f17a1bb442aad25f8eeb70d42 Mon Sep 17 00:00:00 2001
From: HojouFotytu
Date: Wed, 21 Apr 2021 16:27:06 +0900
Subject: [PATCH 24/26] Undo settings.analyzer.json
---
.../settings.analyzer.json | 318 ------------------
1 file changed, 318 deletions(-)
delete mode 100644 PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
diff --git a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
deleted file mode 100644
index d1b0744..0000000
--- a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
+++ /dev/null
@@ -1,318 +0,0 @@
-//
-// 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.
-// Always test your PTMagic settings by running a Profit Trailer bot in TESTMODE, to make sure
-// it is performing as you expect.
-//
-// For more information on these settings, see the wiki at: https://github.com/PTMagicians/PTMagic/wiki/settings.analyzer
-
-
-{
- "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
- "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": "6h",
- "Platform": "Exchange",
- "MaxMarkets": 50,
- "TrendMinutes": 360,
- "TrendCurrency": "Market",
- "TrendThreshold": 30,
- "DisplayGraph": true,
- "DisplayOnMarketAnalyzerList": true
- },
- {
- "Name": "12h",
- "Platform": "Exchange",
- "MaxMarkets": 50,
- "TrendMinutes": 720,
- "TrendCurrency": "Market",
- "TrendThreshold": 50,
- "DisplayGraph": true,
- "DisplayOnMarketAnalyzerList": true
- },
- {
- "Name": "24h",
- "Platform": "Exchange",
- "MaxMarkets": 50,
- "TrendMinutes": 1440,
- "TrendCurrency": "Market",
- "TrendThreshold": 75,
- "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
- {
- "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",
- "MaxChange": -2
- },
- {
- "MarketTrendName": "24h",
- "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.
- "DEFAULT_sell_only_mode_enabled": "true",
- "DEFAULT_trailing_profit_OFFSETPERCENT": -50
- },
- "DCAProperties": { // Properties for DCA.PROPERTIES
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -75
- }
- },
- // -----------------------------
- {
- "SettingName": "TankingDown",
- "TriggerConnection": "AND",
- "Triggers": [
- {
- "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
- },
- "DCAProperties": {
- //"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100,
- "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50
- },
- "IndicatorsProperties": {
- }
- },
- // -----------------------------
- {
- "SettingName": "BearSighted",
- "TriggerConnection": "AND",
- "Triggers": [
- {
- "MarketTrendName": "1h",
- "MaxChange": 1
- },
- {
- "MarketTrendName": "12h",
- "MaxChange": 0
- },
- {
- "MarketTrendName": "24h",
- "MaxChange": -1,
- "MinChange": -3
- }
- ],
- "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
- },
- "DCAProperties": {
- "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10,
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10,
- },
- "IndicatorsProperties": {
- }
- },
- // -----------------------------
- {
- "SettingName": "ReadyForLiftOff",
- "TriggerConnection": "AND",
- "Triggers": [
- {
- "MarketTrendName": "1h",
- "MinChange": 0
- },
- {
- "MarketTrendName": "12h",
- "MinChange": 0
- },
- {
- "MarketTrendName": "24h",
- "MinChange": 1,
- "MaxChange": 3
- }
- ],
- "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
- },
- "DCAProperties": {
- "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10,
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10,
- },
- "IndicatorsProperties": {
- }
- },
- // -----------------------------
- {
- "SettingName": "ToTheMoon",
- "TriggerConnection": "AND",
- "Triggers": [
- {
- "MarketTrendName": "1h",
- "MinChange": 1
- },
- {
- "MarketTrendName": "12h",
- "MinChange": 1
- },
- {
- "MarketTrendName": "24h",
- "MinChange": 3
- }
- ],
- "PairsProperties": {
- "max_trading_pairs_OFFSET": 2,
- //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
- "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
- "DEFAULT_A_sell_value_OFFSETPERCENT": 20
- },
- "DCAProperties": {
- "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
- "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
- },
- "IndicatorsProperties": {
- }
- },
- // -----------------------------
- {
- "SettingName": "Default",
- "PairsProperties": {
- "File": "PAIRS.properties"
- },
- "DCAProperties": {
- "File": "DCA.properties"
- },
- "IndicatorsProperties": {
- "File": "INDICATORS.properties"
- }
- }
- ],
- // ================================ 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"
- }
- },
- // -----------------------------
- {
- "SettingName": "PumpNDumpProtection",
- "TriggerConnection": "OR",
- "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
- "MinChange": 8
- },
- {
- "MarketTrendName": "12h",
- "MarketTrendRelation": "Relative",
- "MinChange": 10
- },
- {
- "MarketTrendName": "24h",
- "MarketTrendRelation": "Relative",
- "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.
- }
- ],
- "PairsProperties": {
- "DEFAULT_sell_only_mode_enabled": "true",
- "DEFAULT_DCA_enabled": "false"
- }
- },
- // -----------------------------
- {
- "SettingName": "FreefallBlock",
- "TriggerConnection": "OR",
- "Triggers": [
- {
- "MarketTrendName": "1h",
- "MarketTrendRelation": "Absolute",
- "MaxChange": -5
- }
- ],
- "OffTriggers": [
- {
- "HoursSinceTriggered": 1
- }
- ],
- "PairsProperties": {
- "DEFAULT_sell_only_mode_enabled": "true",
- "DEFAULT_DCA_enabled": "false"
- }
- }
- ]
- }
-}
\ No newline at end of file
From e4e5d924449ae36cd8299a5f28276322b8c224bd Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 21 Apr 2021 17:14:21 +0900
Subject: [PATCH 25/26] Default settings.analyzer
---
.../settings.analyzer.json | 298 ++++++++++++++++++
.../DevSettings/settings.analyzer.json | 138 ++++----
2 files changed, 357 insertions(+), 79 deletions(-)
create mode 100644 PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
diff --git a/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
new file mode 100644
index 0000000..dcbd5bf
--- /dev/null
+++ b/PTMagic/_defaults/_default_settings_PT_2.x/settings.analyzer.json
@@ -0,0 +1,298 @@
+//
+// 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, and settings.
+//
+// Always test your PTMagic settings by running a Profit Trailer bot in TESTMODE, to make sure
+// it is performing as you expect.
+//
+// For more information on these settings, see the wiki at: https://github.com/PTMagicians/PTMagic/wiki/settings.analyzer
+
+
+{
+ "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
+ "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 on the PTM Monitor market analyzer?
+ },
+ {
+ "Name": "6h",
+ "Platform": "Exchange",
+ "MaxMarkets": 50,
+ "TrendMinutes": 360,
+ "TrendCurrency": "Market",
+ "TrendThreshold": 30,
+ "DisplayGraph": true,
+ "DisplayOnMarketAnalyzerList": true
+ },
+ {
+ "Name": "12h",
+ "Platform": "Exchange",
+ "MaxMarkets": 50,
+ "TrendMinutes": 720,
+ "TrendCurrency": "Market",
+ "TrendThreshold": 50,
+ "DisplayGraph": true,
+ "DisplayOnMarketAnalyzerList": true
+ },
+ {
+ "Name": "24h",
+ "Platform": "Exchange",
+ "MaxMarkets": 50,
+ "TrendMinutes": 1440,
+ "TrendCurrency": "Market",
+ "TrendThreshold": 75,
+ "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
+ {
+ "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",
+ "MaxChange": -2
+ },
+ {
+ "MarketTrendName": "24h",
+ "MaxChange": -5
+ }
+ ],
+ "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": { // 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",
+ "Triggers": [
+ {
+ "MarketTrendName": "1h",
+ "MaxChange": 0
+ }
+ ],
+ "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
+ },
+ "DCAProperties": {
+ //"DEFAULT_DCA_rebuy_timeout_OFFSETPERCENT": 100,
+ "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
+ "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -50
+ },
+ "IndicatorsProperties": {
+ }
+ },
+ // -----------------------------
+ {
+ "SettingName": "BearSighted",
+ "TriggerConnection": "AND",
+ "Triggers": [
+ {
+ "MarketTrendName": "1h",
+ "MaxChange": 1
+ },
+ {
+ "MarketTrendName": "12h",
+ "MaxChange": 0
+ },
+ {
+ "MarketTrendName": "24h",
+ "MaxChange": -1,
+ "MinChange": -3
+ }
+ ],
+ "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
+ },
+ "DCAProperties": {
+ "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 10,
+ "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -10,
+ },
+ "IndicatorsProperties": {
+ }
+ },
+ // -----------------------------
+ {
+ "SettingName": "ReadyForLiftOff",
+ "TriggerConnection": "AND",
+ "Triggers": [
+ {
+ "MarketTrendName": "1h",
+ "MinChange": 0
+ },
+ {
+ "MarketTrendName": "12h",
+ "MinChange": 0
+ },
+ {
+ "MarketTrendName": "24h",
+ "MinChange": 1,
+ "MaxChange": 3
+ }
+ ],
+ "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
+ },
+ "DCAProperties": {
+ "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -10,
+ "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 10,
+ },
+ "IndicatorsProperties": {
+ }
+ },
+ // -----------------------------
+ {
+ "SettingName": "ToTheMoon",
+ "TriggerConnection": "AND",
+ "Triggers": [
+ {
+ "MarketTrendName": "1h",
+ "MinChange": 1
+ },
+ {
+ "MarketTrendName": "12h",
+ "MinChange": 1
+ },
+ {
+ "MarketTrendName": "24h",
+ "MinChange": 3
+ }
+ ],
+ "PairsProperties": {
+ "max_trading_pairs_OFFSET": 2,
+ //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
+ //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
+ "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
+ "DEFAULT_A_sell_value_OFFSETPERCENT": 20
+ },
+ "DCAProperties": {
+ "DEFAULT_DCA_trailing_buy_OFFSETPERCENT": -20,
+ "DEFAULT_DCA_trailing_profit_OFFSETPERCENT": 20,
+ },
+ "IndicatorsProperties": {
+ }
+ },
+ // -----------------------------
+ {
+ "SettingName": "Default",
+ "PairsProperties": {
+ "File": "PAIRS.properties"
+ },
+ "DCAProperties": {
+ "File": "DCA.properties"
+ },
+ "IndicatorsProperties": {
+ "File": "INDICATORS.properties"
+ }
+ }
+ ],
+ //
+ // ================================ COIN-SPECIFIC SETTINGS ================================
+ //
+ "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", // 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
+ },
+ {
+ "MarketTrendName": "12h",
+ "MarketTrendRelation": "Relative",
+ "MinChange": 10
+ },
+ {
+ "MarketTrendName": "24h",
+ "MarketTrendRelation": "Relative",
+ "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.
+ }
+ ],
+ "PairsProperties": {
+ "DEFAULT_sell_only_mode_enabled": "true",
+ "DEFAULT_DCA_enabled": "false"
+ }
+ },
+ {
+ "SettingName": "FreefallBlock",
+ "TriggerConnection": "OR",
+ "Triggers": [
+ {
+ "MarketTrendName": "1h",
+ "MarketTrendRelation": "Absolute",
+ "MaxChange": -5
+ }
+ ],
+ "OffTriggers": [
+ {
+ "HoursSinceTriggered": 1
+ }
+ ],
+ "PairsProperties": {
+ "DEFAULT_sell_only_mode_enabled": "true",
+ "DEFAULT_DCA_enabled": "false"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/_Development/DevSettings/settings.analyzer.json b/_Development/DevSettings/settings.analyzer.json
index d1b0744..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.
- "DEFAULT_sell_only_mode_enabled": "true",
+ "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,29 +100,20 @@
{
"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": {
}
@@ -147,14 +139,14 @@
],
"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": {
}
@@ -180,14 +172,14 @@
],
"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": {
}
@@ -212,9 +204,9 @@
],
"PairsProperties": {
"max_trading_pairs_OFFSET": 2,
- //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
- //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
- "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
+ //"DEFAULT_initial_cost_OFFSETPERCENT": 20,
+ //"DEFAULT_initial_cost_percentage_OFFSETPERCENT": 20,
+ "DEFAULT_trailing_buy_OFFSETPERCENT": -10,
"DEFAULT_A_sell_value_OFFSETPERCENT": 20
},
"DCAProperties": {
@@ -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,8 +264,8 @@
],
"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": {
@@ -292,7 +273,6 @@
"DEFAULT_DCA_enabled": "false"
}
},
- // -----------------------------
{
"SettingName": "FreefallBlock",
"TriggerConnection": "OR",
From d8b3ee612cacdd04c89a60078d47a41de89aecff Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Wed, 21 Apr 2021 19:29:42 +0900
Subject: [PATCH 26/26] Merge Target & Profit
---
Monitor/Pages/SettingsGeneral.cshtml | 2 +-
Monitor/Pages/_get/DashboardTop.cshtml | 68 +++++++++++---------------
2 files changed, 29 insertions(+), 41 deletions(-)
diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml
index 20f0d27..4989f93 100644
--- a/Monitor/Pages/SettingsGeneral.cshtml
+++ b/Monitor/Pages/SettingsGeneral.cshtml
@@ -190,7 +190,7 @@
|
-
- @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)
- {
-
- }
- else
- {
- double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.Value;
-
- }
- }
- else
- {
-
- }
-
+
@if (!@lostValue)
- {
- profitPercentage = profitPercentage * leverageValue;
-
- }
+ {
+ @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;
+
+ }
+ }
else
{