Ejemplo n.º 1
0
from backtest.entrymanager import entryManagerRegistry
from backtest.exitmanager import exitManagerRegistry

# Strategies
# You can implement very complex strategies by subclassing the Strategy
# class directly.  Normally, we prefer to use the canned swing and day
# trading strategies so we can focus on the entry/exit criteria separately
# strategyRegistry.register("My Funky Strategy", MyFunkyStrategy)

# Watchlists
# You can also create special watchlist subclasses to define what
# tickers you will be using in the strategy backtest
# watchlistRegistry.register("My Custom Watcnlist", MyCustomWatchlist)

# Stop managers
# You can create special stop loss handling if needed.
# If you are setting a hard stop on the trade, just use "Basic" in the .ini
# If you are using no stops, just use "None" in the .ini

# For our examples, we use the stock swing and day trade strategies with
# customized entry and exit managers

################################################################################
# Moving Average Crossover specialized classes
from macrossover import MACrossoverEntryManager, MACrossoverExitManager
entryManagerRegistry.register("Moving Average Crossover", MACrossoverEntryManager)
exitManagerRegistry.register("Moving Average Crossover", MACrossoverExitManager)