public static bool PerformStartup()
 {
     if (BackTestHistoryManager.LoadBacktestHistory())
     {
         return(true);
     }
     else
     {
         BackTestHistoryManager.backTestHistory = new BackTestHistory();
         return(false);
     }
 }
        public static void UpdateHistoryEntry(string accountGuid, decimal activationRoi, decimal normalBackTestValue, BaseCustomBot baseCustomBot)
        {
            foreach (var backTestEntry in BackTestHistoryManager.backTestHistory.history)
            {
                if (backTestEntry.AccountGUID.Equals(accountGuid) &&
                    backTestEntry.PrimaryCurrency == baseCustomBot.PriceMarket.PrimaryCurrency &&
                    backTestEntry.SecondayCurrency == baseCustomBot.PriceMarket.SecondaryCurrency)
                {
                    BackTestHistoryManager.RemoveHistoryEntry(backTestEntry);
                    BackTestHistoryManager.AddHistoryEntry(accountGuid, activationRoi, normalBackTestValue, baseCustomBot);
                    return;
                }
            }

            BackTestHistoryManager.AddHistoryEntry(accountGuid, activationRoi, normalBackTestValue, baseCustomBot);
        }
        public static void UpdateHistoryEntry(string accountGuid, EnumPriceSource priceSource, string primaryCurrency, string secondaryCurrency, decimal activationRoi, decimal observedHigh, decimal normalBackTestValue)
        {
            foreach (var backTestEntry in BackTestHistoryManager.backTestHistory.history)
            {
                if (backTestEntry.AccountGUID.Equals(accountGuid) &&
                    backTestEntry.PrimaryCurrency == primaryCurrency &&
                    backTestEntry.SecondayCurrency == secondaryCurrency)
                {
                    BackTestHistoryManager.RemoveHistoryEntry(backTestEntry);
                    BackTestHistoryManager.AddHistoryEntry(accountGuid, priceSource, primaryCurrency, secondaryCurrency, activationRoi, observedHigh, normalBackTestValue);
                    return;
                }
            }

            BackTestHistoryManager.AddHistoryEntry(accountGuid, priceSource, primaryCurrency, secondaryCurrency, activationRoi, observedHigh, normalBackTestValue);
        }