forked from mementum/backtrader
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add listener to get notified about live events
- Loading branch information
1 parent
18cf1a7
commit 794a7ec
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ | |
from .strategy import * | ||
|
||
from .writer import * | ||
from .listener import * | ||
|
||
from .signal import * | ||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8; py-indent-offset:4 -*- | ||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
|
||
import backtrader as bt | ||
from backtrader.utils.py3 import ( with_metaclass) | ||
|
||
|
||
class ListenerBase(with_metaclass(bt.MetaParams, object)): | ||
def next(): | ||
pass | ||
|
||
def start(self, cerebro): | ||
pass | ||
|
||
def stop(self): | ||
pass |