mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-08 19:42:53 +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:
committed by
Eddie Hebert
parent
8e27cc053c
commit
d475766c63
@@ -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