mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-28 12:51:29 +08:00
DOC: Fix docstring for TradingAlgorithm
Fix the example given in the class docstring as the original didn't work on REPL.
This commit is contained in:
1 parent
8e27cc053c
commit
d475766c63
1 file changed
+3
-2
@@ -63,10 +63,11 @@ class TradingAlgorithm(object):
|
||||
A new algorithm could look like this:
|
||||
```
|
||||
class MyAlgo(TradingAlgorithm):
|
||||
def initialize(amount):
|
||||
def initialize(self, sids, amount):
|
||||
self.sids = sids
|
||||
self.amount = amount
|
||||
|
||||
def handle_data(data):
|
||||
def handle_data(self, data):
|
||||
sid = self.sids[0]
|
||||
self.order(sid, amount)
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user