This class represents a condition requiring a specific execution event to be fulfilled. Orders can be activated or canceled if a set of given conditions is met. An ExecutionCondition is met whenever a trade occurs on a certain product at the given exchange.
Inheritance: OrderCondition
Esempio n. 1
0
        public static OrderCondition Create(OrderConditionType type)
        {
            OrderCondition rval = null;

            switch (type)
            {
            case OrderConditionType.Execution:
                rval = new ExecutionCondition();
                break;

            case OrderConditionType.Margin:
                rval = new MarginCondition();
                break;

            case OrderConditionType.PercentCange:
                rval = new PercentChangeCondition();
                break;

            case OrderConditionType.Price:
                rval = new PriceCondition();
                break;

            case OrderConditionType.Time:
                rval = new TimeCondition();
                break;

            case OrderConditionType.Volume:
                rval = new VolumeCondition();
                break;
            }

            if (rval != null)
            {
                rval.Type = type;
            }

            return(rval);
        }
Esempio n. 2
0
        public static OrderCondition Create(OrderConditionType type)
        {
            OrderCondition rval = null;

            switch (type)
            {
                case OrderConditionType.Execution:
                    rval = new ExecutionCondition();
                    break;

                case OrderConditionType.Margin:
                    rval = new MarginCondition();
                    break;

                case OrderConditionType.PercentCange:
                    rval = new PercentChangeCondition();
                    break;

                case OrderConditionType.Price:
                    rval = new PriceCondition();
                    break;

                case OrderConditionType.Time:
                    rval = new TimeCondition();
                    break;

                case OrderConditionType.Volume:
                    rval = new VolumeCondition();
                    break;
            }

            if (rval != null)
                rval.Type = type;

            return rval;
        }