/// <summary>
        /// Saves the strategy in XML format.
        /// </summary>
        public void Save(string fileName)
        {
            StrategyName = Path.GetFileNameWithoutExtension(fileName);
            Symbol       = Data.Symbol;
            DataPeriod   = Data.Period;

            XmlDocument xmlDocStrategy = StrategyXML.CreateStrategyXmlDoc(this);

            try
            {
                xmlDocStrategy.Save(fileName); // Save the document to a file.
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
        /// <summary>
        /// Copies the strategy to clipboard.
        /// </summary>
        protected override void MenuStrategyCopy_OnClick(object sender, EventArgs e)
        {
            XmlDocument xmlDoc = StrategyXML.CreateStrategyXmlDoc(Data.Strategy);

            Clipboard.SetText(xmlDoc.InnerXml);
        }