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
Enable support for custom indicators, similar to how one would be created for a QC Algorithm
class CustomSimpleMovingAverage: def __init__(self, name, period): self.Name = name self.Time = datetime.min self.Value = 0 self.IsReady = False self.queue = deque(maxlen=period) def __repr__(self): return "{0} -> IsReady: {1}. Time: {2}. Value: {3}".format(self.Name, self.IsReady, self.Time, self.Value) # Update method is mandatory def Update(self, input): self.queue.appendleft(input.Close) count = len(self.queue) self.Time = input.EndTime self.Value = sum(self.queue) / count self.IsReady = count == self.queue.maxlen custom = CustomSimpleMovingAverage('SPY', 21) x = qb.Indicator(CustomSimpleMovingAverage, 'SPY', 360, Resolution.Daily)
The text was updated successfully, but these errors were encountered:
@AlexCatarino Hey do you know when this might be available? Thanks! :)
Sorry, something went wrong.
+1 to this...
+1
AlexCatarino
No branches or pull requests
Enable support for custom indicators, similar to how one would be created for a QC Algorithm
The text was updated successfully, but these errors were encountered: