Forex_Strategy_Builder.Command_Console.ShowOrder C# (CSharp) Method

ShowOrder() private method

Show position
private ShowOrder ( string input ) : void
input string
return void
        void ShowOrder(string input)
        {
            string pattern = @"^ord (?<numb>\d+)$";
            Regex expression = new Regex(pattern, RegexOptions.Compiled);
            Match match = expression.Match(input);
            if (match.Success)
            {
                int ord = int.Parse(match.Groups["numb"].Value);
                if (ord < 1 || ord > Backtester.OrdersTotal)
                    return;

                Order order = Backtester.OrdFromNumb(ord - 1);
                tbxOutput.Text += "Order" + Environment.NewLine + "-----------------" +
                    Environment.NewLine + order.ToString() + Environment.NewLine;
            }
        }