Skip to content

Instantly share code, notes, and snippets.

@mementum
Last active July 19, 2019 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mementum/bdf69773d4502a4d1e2efaa55b6ee2fd to your computer and use it in GitHub Desktop.
Save mementum/bdf69773d4502a4d1e2efaa55b6ee2fd to your computer and use it in GitHub Desktop.
class MFI_Canonical(bt.Indicator):
lines = ('mfi',)
params = dict(period=14)
def __init__(self):
psum = self.data.close + self.data.low + self.data.high
tprice = psum / 3.0
mfraw = tprice * self.data.volume
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment