commit
b1d77b9820
|
@ -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...");
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -41,18 +41,36 @@ namespace Core.ProfitTrailer
|
|||
case "emagain":
|
||||
result = "EG";
|
||||
break;
|
||||
case "hmagain":
|
||||
result = "EG";
|
||||
break;
|
||||
case "dmagain":
|
||||
result = "EG";
|
||||
break;
|
||||
case "smaspread":
|
||||
result = "SS";
|
||||
break;
|
||||
case "emaspread":
|
||||
result = "ES";
|
||||
break;
|
||||
case "hmaspread":
|
||||
result = "ES";
|
||||
break;
|
||||
case "dmaspread":
|
||||
result = "ES";
|
||||
break;
|
||||
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;
|
||||
|
@ -80,6 +98,9 @@ namespace Core.ProfitTrailer
|
|||
case "bbwidth":
|
||||
result = "BBW";
|
||||
break;
|
||||
case "pdhigh":
|
||||
result = "PDH";
|
||||
break;
|
||||
case "anderson":
|
||||
result = "AND";
|
||||
break;
|
||||
|
@ -153,10 +174,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 +194,9 @@ namespace Core.ProfitTrailer
|
|||
case "obv":
|
||||
case "bbwidth":
|
||||
case "anderson":
|
||||
case "dema":
|
||||
case "hma":
|
||||
case "pdhigh":
|
||||
result = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -207,11 +237,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":
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue