Skip to content

Instantly share code, notes, and snippets.

@mementum
Created September 4, 2019 12:14
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/23721e4b865a023e551bdc2b2535ac15 to your computer and use it in GitHub Desktop.
Save mementum/23721e4b865a023e551bdc2b2535ac15 to your computer and use it in GitHub Desktop.
Ported Pinescript-Backtrader Wrong
def __init__(self):
self.donchian = DonchianChannels()
def next(self):
if self.data[0] > self.donchian.dch[-1]:
self.sell()
elif self.data[0] < self.donchian.dcl[-1]:
self.buy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment