Scan() public static method

Performs an intrabar scanning
public static Scan ( ) : void
return void
        /// <summary>
        /// This event handler deals with the results of the background operation.
        /// </summary>
        private void BgWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (Data.IsIntrabarData || Configs.UseTickData && Data.IsTickData || Data.Period == DataPeriods.min1)
            {
                Backtester.Scan();
            }

            if (!CompactMode)
            {
                ShowScanningResult();
            }
            CompleteScanning();

            if (_warningMessage != string.Empty && Configs.CheckData)
            {
                MessageBox.Show(_warningMessage + Environment.NewLine + Environment.NewLine +
                                Language.T("The data is probably incomplete and the scanning may not be reliable!") +
                                Environment.NewLine +
                                Language.T("You can try also \"Cut Off Bad Data\"."),
                                Language.T("Scanner"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            if (CompactMode)
            {
                Close();
            }
        }
示例#2
0
        /// <summary>
        /// This event handler deals with the results of the background operation.
        /// </summary>
        void BgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (Data.IsIntrabarData ||
                Configs.UseTickData && Data.IsTickData ||
                Data.Period == DataPeriods.min1)
            {
                Backtester.Scan();
            }

            ShowScanningResult();

            if (warningMessage != string.Empty && Configs.CheckData)
            {
                MessageBox.Show(warningMessage + Environment.NewLine + Environment.NewLine +
                                Language.T("Probably the data is incomplete and the scanning may not be reliable!") + Environment.NewLine +
                                Language.T("You can try also \"Cut Off Bad Data\"."),
                                Language.T("Scanner"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            progressBar.Style = ProgressBarStyle.Blocks;

            if (isCompactMode)
            {
                Close();
            }

            return;
        }
示例#3
0
        /// <summary>
        /// Perform intrabar scanning
        /// </summary>
        void Scan()
        {
            if (!Data.IsIntrabarData)
            {
                ShowScanner();
            }
            else
            {
                Backtester.Scan();
            }

            infpnlAccountStatistics.Update(Backtester.AccountStatsParam, Backtester.AccountStatsValue,
                                           Backtester.AccountStatsFlags, Language.T("Account Statistics"));
            smallBalanceChart.SetChartData();
            smallBalanceChart.InitChart();
            smallBalanceChart.Invalidate();
            SetupJournal();
        }
        /// <summary>
        /// Loads data and recalculates.
        /// </summary>
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);

            if (CompactMode)
            {
                return;
            }

            if (!Data.IsIntrabarData)
            {
                StartLoading();
            }
            else
            {
                Backtester.Scan();
                ShowScanningResult();
                ProgressBar.Value = 100;
                BtnClose.Focus();
            }
        }