mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-03 01:58:14 +08:00
Merge pull request #69 from mjhanninen/fix-example
Fixes an incorrect order in examples.
This commit is contained in:
@@ -109,7 +109,7 @@ class Pairtrade(TradingAlgorithm):
|
||||
ko_amount = self.portfolio.positions['KO'].amount
|
||||
self.order('KO', -1 * ko_amount)
|
||||
pep_amount = self.portfolio.positions['PEP'].amount
|
||||
self.order('KO', -1 * pep_amount)
|
||||
self.order('PEP', -1 * pep_amount)
|
||||
|
||||
if __name__ == '__main__':
|
||||
data = load_from_yahoo(stocks=['PEP', 'KO'], indexes={})
|
||||
|
||||
Reference in New Issue
Block a user