We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduled Events are triggered after consolidators/indicators are updated.
Scheduled Events are triggered before consolidators/indicators are updated.
Reorganize the calls.
namespace QuantConnect.Algorithm.CSharp { public class SwimmingBlackArmadillo : QCAlgorithm { private int _day = 0; public override void Initialize() { SetStartDate(2021, 5, 1); AddEquity("SPY"); SMA("SPY", 5).Updated += OnSmaUpdated; Schedule.On(DateRules.EveryDay("SPY"), TimeRules.AfterMarketOpen("SPY", 1), () => Log($"AfterMarketOpen on {Time}") ); } private void OnSmaUpdated(object sender, IndicatorDataPoint updated) { if (_day == updated.EndTime.Day) return; _day = updated.EndTime.Day; Log($"OnSmaUpdated on {Time}"); } } }
master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Scheduled Events are triggered after consolidators/indicators are updated.
Actual Behavior
Scheduled Events are triggered before consolidators/indicators are updated.
Potential Solution
Reorganize the calls.
Reproducing the Problem
Checklist
master
branchThe text was updated successfully, but these errors were encountered: