We have documentation for Scheduled Events, Scheduled Events, and below is an exanmple for a Scheduled Event for "SPY".

Setting up a Scheduled Events is done in the Initialized method. Instead of an Equity like "SPY", how would you schedule an AfterMarketOpen event for Futures when the futures contract changes each month or every 3 months?

// Schedule an event to fire every trading day for a security // The time rule here tells it to fire 10 minutes after SPY's market open Schedule.On(DateRules.EveryDay("SPY"), TimeRules.AfterMarketOpen("SPY", 10), () => { Log("EveryDay.SPY 10 min after open: Fired at: " + Time); });

 

 

Author