BinanceFutures Quarterly Ignore

This commit is contained in:
HojouFotytu 2021-03-29 02:31:25 +09:00
parent 46ce12bd48
commit 01aa86c076
1 changed files with 24 additions and 0 deletions

View File

@ -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<string, string>();
// 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();