Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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