diff --git a/Core/DataObjects/PTMagicData.cs b/Core/DataObjects/PTMagicData.cs
index 1f2dd55..7ed07a6 100644
--- a/Core/DataObjects/PTMagicData.cs
+++ b/Core/DataObjects/PTMagicData.cs
@@ -48,6 +48,7 @@ namespace Core.Main.DataObjects.PTMagicData
public string TimezoneOffset { get; set; } = "+0:00";
public string MainFiatCurrency { get; set; } = "USD";
public string CoinMarketCapAPIKey { get; set; }
+ public string FreeCurrencyConverterAPIKey { get; set; } = "sample-api-key";
}
public class Monitor
diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs
index 2521b45..c759478 100644
--- a/Core/Main/PTMagic.cs
+++ b/Core/Main/PTMagic.cs
@@ -693,6 +693,16 @@ namespace Core.Main
{
this.Log.DoLogInfo("No CoinMarketCap API KEY specified! You can't use CoinMarketCap in your settings.analyzer.json");
}
+
+ // Check for CurrencyConverterApi Key
+ if (!this.PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey.Equals(""))
+ {
+ this.Log.DoLogInfo("FreeCurrencyConverterApi KEY found");
+ }
+ else
+ {
+ this.Log.DoLogInfo("No FreeCurrencyConverterApi KEY specified, using default key.");
+ }
}
else
@@ -1033,7 +1043,7 @@ namespace Core.Main
try
{
this.LastRuntimeSummary.MainFiatCurrency = this.PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency;
- this.LastRuntimeSummary.MainFiatCurrencyExchangeRate = BaseAnalyzer.GetMainFiatCurrencyRate(this.PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency, this.Log);
+ this.LastRuntimeSummary.MainFiatCurrencyExchangeRate = BaseAnalyzer.GetMainFiatCurrencyRate(this.PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency, this.PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey, this.Log);
this.LastMainFiatCurrency = this.LastRuntimeSummary.MainFiatCurrency;
this.LastMainFiatCurrencyExchangeRate = this.LastRuntimeSummary.MainFiatCurrencyExchangeRate;
diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs
index 8a1e478..ca38f1b 100644
--- a/Core/MarketAnalyzer/BaseAnalyzer.cs
+++ b/Core/MarketAnalyzer/BaseAnalyzer.cs
@@ -208,11 +208,11 @@ namespace Core.MarketAnalyzer
return result;
}
- public static double GetMainFiatCurrencyRate(string currency, LogHelper log)
+ public static double GetMainFiatCurrencyRate(string currency, string FreeCurrencyAPI, LogHelper log)
{
double result = 1;
- string baseUrl = "http://free.currencyconverterapi.com/api/v5/convert?q=USD_" + currency + "&compact=y&apiKey=sample-api-key";
+ string baseUrl = "http://free.currencyconverterapi.com/api/v5/convert?q=USD_" + currency + "&compact=y&apiKey=" + FreeCurrencyAPI;
log.DoLogDebug("http://free.currencyconverterapi.com - Getting latest exchange rates...");
Newtonsoft.Json.Linq.JObject jsonObject = GetSimpleJsonObjectFromURL(baseUrl, log, false);
diff --git a/Core/ProfitTrailer/StrategyHelper.cs b/Core/ProfitTrailer/StrategyHelper.cs
index aee5ec5..cee6e96 100644
--- a/Core/ProfitTrailer/StrategyHelper.cs
+++ b/Core/ProfitTrailer/StrategyHelper.cs
@@ -197,6 +197,7 @@ namespace Core.ProfitTrailer
case "dema":
case "hma":
case "pdhigh":
+ case "signal":
result = true;
break;
default:
@@ -458,4 +459,4 @@ namespace Core.ProfitTrailer
return result;
}
}
-}
\ No newline at end of file
+}
diff --git a/Monitor/Monitor.csproj b/Monitor/Monitor.csproj
index f81b5e1..4aa31e8 100644
--- a/Monitor/Monitor.csproj
+++ b/Monitor/Monitor.csproj
@@ -22,10 +22,10 @@
-
-
-
-
+
+
+
+
diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs
index fa1e7e0..4edac9b 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.2")]
+[assembly: AssemblyVersion("2.1.3")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic