public MainForm()
 {
     InitializeComponent();
     Parameters parameters = new Parameters(c_params);
     Chart chart = new Chart();
     chart.Dock = DockStyle.Fill;
     chart.Construct(parameters);
     this.Controls.Add(chart);
 }
        internal ChartSettingsDialog(Chart chart)
        {
            if (null == chart)
            {
                throw new ArgumentNullException("chart");
            }
            InitializeComponent();

            this.Text += chart.Parameters.Symbol;
            m_chart = chart;
            m_propertyGrid.SelectedObject = chart.Settings;
            m_propertyGrid.PropertyValueChanged += OnChanged;
        }
        public static int Run(string argument)
        {
            try
            {
                Debug.WriteLine(argument);
                Parameters parameters = new Parameters(argument);
                Chart indicator = new Chart();
                Debug.WriteLine(parameters.Symbol);
                indicator.Construct(parameters);
                indicator.Show();

                return indicator.Handle.ToInt32();
            }
            catch (System.Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return 0;
            }
        }