That's just the log to print. Where to you capture the crossover and send it to the log?
Posts made by run-out
RE: Run strategy only once indicators are warmed up posted in General Code/Help
RE: Get mininum and maximum dates in backtrader DataFeed
You can pre-scrub your data using pandas, then if it passes your test, load the data into the backtest.
RE: How to backtest over long timespan with intraday candles
@Wayne-Filkins We're gonna need more details my friend... :)
RE: ./panda-test.py --noheaders -> AttributeError: 'numpy.int64' object has no attribute 'lower
Can you show the code you are trying to run please?
RE: TypeError: super(type, obj): obj must be an instance or subtype of type
if name == 'main':
After the if name == 'main': line, you must indent all of the following code by 4 spaces.
RE: Using Timer to Buy and different indicator to Sell Strategy Help
Just a few things to tidy up your code.
Weekdays is plural.
Check if there's an open order in:
def notify_timer(self, timer, when, *args, **kwargs): if not self.position or not self.order: self.buy(size=1)
Use close instead of sell in next:
if self.position and self.rsi > 70: self.close()