Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Last active June 20, 2025 13:12
Show Gist options
  • Save quantra-go-algo/ad4aff10b2000765dbdee78784e6a688 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/ad4aff10b2000765dbdee78784e6a688 to your computer and use it in GitHub Desktop.
# Initialization of strategy
def __init__(self):
self.ma = bt.indicators.SimpleMovingAverage(self.data.close, period=100) # 100-day moving average
self.order = None # Used to track pending orders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment