/// <summary>
        /// Checks whether the strategy have been saved or not
        /// </summary>
        void Actions_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dialogResult = WhetherSaveChangedStrategy();

            if (dialogResult == DialogResult.Yes)
            {
                SaveStrategy();
            }
            else if (dialogResult == DialogResult.Cancel)
            {
                e.Cancel = true;
            }

            if (!e.Cancel)
            {
                // Remember the last used strategy
                if (Configs.RememberLastStr)
                {
                    if (Data.LoadedSavedStrategy != "")
                    {
                        string strategyPath = Path.GetDirectoryName(Data.LoadedSavedStrategy) + Path.DirectorySeparatorChar;
                        string defaultPath  = Path.Combine(Data.ProgramDir, Data.DefaultStrategyDir);
                        if (strategyPath == defaultPath)
                        {
                            Data.LoadedSavedStrategy = Path.GetFileName(Data.LoadedSavedStrategy);
                        }
                    }
                    Configs.LastStrategy = Data.LoadedSavedStrategy;
                }

                Configs.SaveConfigs();
                Instruments.SaveInstruments();
#if !DEBUG
                this.Hide();
                Data.SendStats();
#endif
            }

            return;
        }