Skip to content

Instantly share code, notes, and snippets.

@mementum
Created September 4, 2019 12:15
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Ported Pinescript-Backtrader right
def __init__(self):
self.donchian = DonchianChannels()
def next(self):
if self.data[0] > self.donchian.dch[0]:
self.sell()
elif self.data[0] < self.donchian.dcl[0]:
self.buy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment