From 8d6b09ee00eac9dc162a2fdac5afabb7b8fba5d3 Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Thu, 21 Mar 2019 21:44:16 +0900 Subject: [PATCH] OFFSETPERCENT integer requirements --- Core/ProfitTrailer/SettingsHandler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/ProfitTrailer/SettingsHandler.cs b/Core/ProfitTrailer/SettingsHandler.cs index 93cade3..76269dc 100644 --- a/Core/ProfitTrailer/SettingsHandler.cs +++ b/Core/ProfitTrailer/SettingsHandler.cs @@ -74,7 +74,13 @@ namespace Core.ProfitTrailer double oldValueOffset = (oldValue * (offsetValuePercent / 100)); // Use integers for timeout and pairs properties, otherwise double - if (configPropertyKey.Contains("rebuy_timeout", StringComparison.InvariantCultureIgnoreCase) || configPropertyKey.Contains("trading_pairs", StringComparison.InvariantCultureIgnoreCase)) + if (configPropertyKey.Contains("timeout", StringComparison.InvariantCultureIgnoreCase) + || configPropertyKey.Contains("trading_pairs", StringComparison.InvariantCultureIgnoreCase) + || configPropertyKey.Contains("buy_volume", StringComparison.InvariantCultureIgnoreCase) + || configPropertyKey.Contains("listed_days", StringComparison.InvariantCultureIgnoreCase + || configPropertyKey.Contains("orderbook_depth", StringComparison.InvariantCultureIgnoreCase) + || configPropertyKey.Contains("rebuy_count", StringComparison.InvariantCultureIgnoreCase) + || configPropertyKey.Contains("buy_volume", StringComparison.InvariantCultureIgnoreCase)) { // Ensure some values are rounded up to integers for PT comaptability result = ((int)(Math.Round((oldValue + oldValueOffset), MidpointRounding.AwayFromZero) + .5)).ToString(new System.Globalization.CultureInfo("en-US"));