From 6abd6e32a55fd6264264432ce76168afbdff576f Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Thu, 24 Jan 2019 21:03:19 +0900 Subject: [PATCH 1/3] new PT strategy icons --- Core/ProfitTrailer/StrategyHelper.cs | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Core/ProfitTrailer/StrategyHelper.cs b/Core/ProfitTrailer/StrategyHelper.cs index 8e2a7ca..f5918ec 100644 --- a/Core/ProfitTrailer/StrategyHelper.cs +++ b/Core/ProfitTrailer/StrategyHelper.cs @@ -40,6 +40,10 @@ namespace Core.ProfitTrailer break; case "emagain": result = "EG"; + case "hmagain": + result = "EG"; + case "dmagain": + result = "EG"; break; case "smaspread": result = "SS"; @@ -47,12 +51,22 @@ namespace Core.ProfitTrailer case "emaspread": result = "ES"; break; + case "hmaspread": + result = "ES"; + case "dmaspread": + result = "ES"; case "smacross": result = "SC"; break; case "emacross": result = "EC"; break; + case "hmacross": + result = "SC"; + break; + case "dmacross": + result = "EC"; + break; case "rsi": result = "RSI"; break; @@ -79,6 +93,9 @@ namespace Core.ProfitTrailer break; case "bbwidth": result = "BBW"; + break + case "pdhigh": + result = "PDH"; break; case "anderson": result = "AND"; @@ -153,10 +170,16 @@ namespace Core.ProfitTrailer case "loss": case "smagain": case "emagain": + case "hmagain": + case "dmagain": case "smaspread": case "emaspread": + case "hmaspread": + case "dmaspread": case "smacross": case "emacross": + case "hmacross": + case "dmacross": case "rsi": case "stoch": case "stochrsi": @@ -167,6 +190,9 @@ namespace Core.ProfitTrailer case "obv": case "bbwidth": case "anderson": + case "dema": + case "hma": + case "pdhigh": result = true; break; default: @@ -207,11 +233,18 @@ namespace Core.ProfitTrailer case "loss": case "smagain": case "emagain": + case "hmagain": + case "dmagain": case "smaspread": case "emaspread": - case "anderson": + case "hmaspread": + case "dmaspread": case "smacross": case "emacross": + case "hmacross": + case "dmacross": + case "anderson": + case "pdhigh": result = 2; break; case "rsi": From 50c91f4ce8660f57df8415c409ac128910dde86e Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Thu, 24 Jan 2019 21:09:45 +0900 Subject: [PATCH 2/3] new PT strategy icons part 2 --- Core/ProfitTrailer/StrategyHelper.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/ProfitTrailer/StrategyHelper.cs b/Core/ProfitTrailer/StrategyHelper.cs index f5918ec..aee5ec5 100644 --- a/Core/ProfitTrailer/StrategyHelper.cs +++ b/Core/ProfitTrailer/StrategyHelper.cs @@ -40,8 +40,10 @@ namespace Core.ProfitTrailer break; case "emagain": result = "EG"; + break; case "hmagain": result = "EG"; + break; case "dmagain": result = "EG"; break; @@ -53,8 +55,10 @@ namespace Core.ProfitTrailer break; case "hmaspread": result = "ES"; + break; case "dmaspread": result = "ES"; + break; case "smacross": result = "SC"; break; @@ -93,7 +97,7 @@ namespace Core.ProfitTrailer break; case "bbwidth": result = "BBW"; - break + break; case "pdhigh": result = "PDH"; break; From 86ca9023b4f4d24afebe128329ffbf1379fe96c1 Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Thu, 24 Jan 2019 23:05:10 +0900 Subject: [PATCH 3/3] force loading local default settings on first run --- Core/Main/PTMagic.cs | 3 ++- Core/ProfitTrailer/SettingsHandler.cs | 1 - PTMagic/Program.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index bfd0e62..5e3ef98 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -559,6 +559,7 @@ namespace Core.Main SettingsFiles.CheckPresets(this.PTMagicConfiguration, this.Log, true); + EnforceSettingsReapply = true; this.StartPTMagicIntervalTimer(); return result; @@ -903,7 +904,7 @@ namespace Core.Main FileInfo generalSettingsFile = new FileInfo(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "settings.general.json"); FileInfo analyzerSettingsFile = new FileInfo(Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "settings.analyzer.json"); - if (generalSettingsFile.LastWriteTime > this.LastSettingFileCheck || analyzerSettingsFile.LastWriteTime > this.LastSettingFileCheck) + if (generalSettingsFile.LastWriteTime > this.LastSettingFileCheck || analyzerSettingsFile.LastWriteTime > this.LastSettingFileCheck || EnforceSettingsReapply) { Log.DoLogInfo("Detected configuration changes. Reloading settings..."); diff --git a/Core/ProfitTrailer/SettingsHandler.cs b/Core/ProfitTrailer/SettingsHandler.cs index b0654fe..37481c2 100644 --- a/Core/ProfitTrailer/SettingsHandler.cs +++ b/Core/ProfitTrailer/SettingsHandler.cs @@ -90,7 +90,6 @@ namespace Core.ProfitTrailer fileLines.Insert(0, "# ####################################"); fileLines.Insert(0, "# PTMagic_LastChanged = " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString()); fileLines.Insert(0, "# PTMagic_ActiveSetting = " + SystemHelper.StripBadCode(ptmagicInstance.DefaultSettingName, Constants.WhiteListProperties)); - fileLines.Insert(0, "# ####### PTMagic Current Setting ########"); fileLines.Insert(0, "# ####################################"); ptmagicInstance.GetType().GetProperty(fileType + "Lines").SetValue(ptmagicInstance, fileLines); diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs index 43c3d10..31a3b7c 100644 --- a/PTMagic/Program.cs +++ b/PTMagic/Program.cs @@ -7,7 +7,7 @@ using Core.Helper; using Core.Main.DataObjects.PTMagicData; using Microsoft.Extensions.DependencyInjection; -[assembly: AssemblyVersion("2.1.0")] +[assembly: AssemblyVersion("2.1.1")] [assembly: AssemblyProduct("PT Magic")] namespace PTMagic