Created
September 4, 2019 12:15
-
-
Save mementum/c85c4cdcec3afbdf086c9ea1e8d7c7a7 to your computer and use it in GitHub Desktop.
Ported Pinescript-Backtrader right
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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