Exemplo n.º 1
0
 public PairCondor(PairCondor source)
 {
     this.Dummy      = source.Dummy;
     this.SectorEnum = source.SectorEnum;
     this.Strategy   = source.Strategy;
     if (source.BullPutSpread != null)
     {
         this.BullPutSpread = new BullPutSpread(source.BullPutSpread);
     }
     if (source.BearCallSpread != null)
     {
         this.BearCallSpread = new BearCallSpread(source.BearCallSpread);
     }
 }
Exemplo n.º 2
0
 public bool AddPairCondor(PairCondor pairCondor)
 {
     if (this.Pairs.Any(x => x.BullPutSpread.SecurityIdentifier == pairCondor.BullPutSpread.SecurityIdentifier ||
                        x.BullPutSpread.SecurityIdentifier == pairCondor.BearCallSpread.SecurityIdentifier ||
                        x.BearCallSpread.SecurityIdentifier == pairCondor.BullPutSpread.SecurityIdentifier ||
                        x.BearCallSpread.SecurityIdentifier == pairCondor.BearCallSpread.SecurityIdentifier))
     {
         return(false);
     }
     else
     {
         this.Pairs.Add(pairCondor);
         return(true);
     }
 }