private SortedDictionary<float, StockPersonality> EvalPersonalityList(StockSerie stockSerie, List<StockPersonality> personalityList)
        {
            SortedDictionary<float, StockPersonality> returnDico = new SortedDictionary<float, StockPersonality>();

            float returnValue;
            foreach (StockPersonality stockPersonality in personalityList)
            {
                stockSerie.StockAnalysis.StockPersonality = stockPersonality;
                stockSerie.AddSerie(StockDataType.SAREX_FOLLOWER_CUSTOM, null);
                stockSerie.AddSerie(StockIndicatorType.BUY_SELL_RATE, null);

                returnValue = stockSerie.CalculateSarReturn(StockDataType.SAREX_FOLLOWER_CUSTOM);
                if (returnValue >0 && !returnDico.ContainsKey(returnValue))
                {
                    returnDico.Add(returnValue, stockPersonality);
                }
            }

            return returnDico;
        }
        private void UpdateBestForValue(StockSerie stockSerie, FloatPropertyRange range, bool refreshGUI,
            ref float bestReturn, ref StockPersonality bestPersonality, float currentValue)
        {
            stockSerie.StockAnalysis.StockPersonality.SetFloatPropertyValue(range, currentValue);
            stockSerie.ResetSAREX();

            float currentReturn = stockSerie.CalculateSarReturn(StockDataType.SAREX_FOLLOWER_CUSTOM);

            if ( currentReturn > bestReturn)
            {
                bestPersonality = stockSerie.StockAnalysis.StockPersonality.Clone();
                bestReturn = currentReturn;

                // Refresh GUI
                if (refreshGUI)
                {
                    this.simulationParameterControl.Personality = bestPersonality;
                }
            }
            if (!this.allStocksCheckBox.Checked)
            {
                if (this.progressBar.Value < this.progressBar.Maximum)
                {
                    this.progressBar.Value++;
                }
                else
                {
                    this.progressBar.Value = 0;
                }
            }
        }