Ejemplo n.º 1
0
        private void fillFromCondition(PercentChangeCondition percentChangeCondition)
        {
            percent.Text      = percentChangeCondition.ChangePercent.ToString();
            percentRb.Checked = true;

            fillUnderlyingContract(percentUnderlying, percentChangeCondition);
            fillOperator(percentOperator, percentChangeCondition);
        }
Ejemplo 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.PercentChange:
            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 ?? throw new InvalidOperationException("Invalid OrderConditionType."));
    }
Ejemplo n.º 3
0
 private void fillCondition(PercentChangeCondition percentChangeCondition)
 {
     fillOperator(percentChangeCondition, percentOperator);
     fillUnderlyingContract(percentChangeCondition, percentUnderlying);
 }