/// <summary> /// Defines the option chain universe filter /// </summary> protected override OptionFilterUniverse Filter(OptionFilterUniverse filter) { return(filter .Strikes(+1, +1) .Expiration(TimeSpan.Zero, TimeSpan.FromDays(7)) .WeeklysOnly() .PutsOnly() .OnlyApplyFilterAtMarketOpen()); }
/// <summary> /// Defines the option chain universe filter /// </summary> protected override OptionFilterUniverse Filter(OptionFilterUniverse filter) { return(filter .Strikes(-20, +20) .Expiration(TimeSpan.Zero, TimeSpan.FromDays(60))); //.WeeklysOnly() //.PutsOnly() //.OnlyApplyFilterAtMarketOpen(); }
/// <summary> /// Defines the option chain universe filter /// </summary> protected override OptionFilterUniverse Filter(OptionFilterUniverse filter) { return(filter .Strikes(+1, +1) .Expiration(TimeSpan.Zero, TimeSpan.FromDays(7)) .WeeklysOnly() .Contracts(contracts => contracts.Where(x => x.ID.OptionRight == OptionRight.Put)) .OnlyApplyFilterAtMarketOpen()); }
/// <summary> /// Defines the option chain universe filter /// </summary> protected override OptionFilterUniverse Filter(OptionFilterUniverse filter) { return(filter .Strikes(+1, +1) // Expiration method accepts TimeSpan objects or integer for days. // The following statements yield the same filtering criteria .Expiration(0, 7) //.Expiration(TimeSpan.Zero, TimeSpan.FromDays(7)) .WeeklysOnly() .PutsOnly() .OnlyApplyFilterAtMarketOpen()); }