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] 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();