Logout when plotting
Pang Wai Yuen last edited by
I am quite new to python an absolute new to Backtrader, so if I asked something stupid please forgive me.
When I run this code from my terminal my user got logout, would someone please help? I am using Mac OS
from future import (absolute_import, division, print_function,
import backtrader as bt
from IPython import get_ipython
self.sma = bt.indicators.SimpleMovingAverage(self.data)
data = bt.feeds.BacktraderCSVData(dataname='/Users/py/Documents/python/testdata/forex.csv')
cerebro = bt.Cerebro()
- Top of the page
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
- The backtrader code itself does not run in the shell and has no contact with it. It seems awkward to import
get_ipythonand to run
cerebro.plot(ipython=False), because those seems to be related to be running inside a Jupyter Notebook or Spyder environment.