public EZSpreadInstrument(ezSpreadDefinition spreadDefinition)
            : base()
        {
            this.spreadDefinition = spreadDefinition;

            foreach (ezSpreadLeg leg in spreadDefinition.Legs)
            {
                spreadLegs[leg.Instrument] = leg;
            }
        }
        private void btnBuildSpread_Click(object sender, EventArgs e)
        {
            ezSpreadDefinition def  = new ezSpreadDefinition();
            ezSpreadLeg        leg1 = new ezSpreadLeg(instrument1, zBuySell.Buy, Convert.ToInt32(txtExecQty1.Text), Convert.ToDouble(txtPriceMult1.Text));
            ezSpreadLeg        leg2 = new ezSpreadLeg(instrument2, zBuySell.Sell, Convert.ToInt32(txtExecQty2.Text), Convert.ToDouble(txtPriceMult2.Text));

            def.AddSpreadLeg(leg1);
            def.AddSpreadLeg(leg2);
            spread = new EZSpreadInstrument(def);
            api.SubscribeToSpread(spread);
            status.Text = "Spread created.";
        }