Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing build error by adding [:] #356
  • Loading branch information
zlpatel authored Jun 13, 2021
commit 97712c7b91ab5fe9520010a669b5e1aabe9e62fc
2 changes: 1 addition & 1 deletion backtesting/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _plot_pl_section():
size = trades['Size'].abs()
size = np.interp(size, (size.min(), size.max()), (8, 20))
ohlcv_index_trade_close_arr = np.empty(source.data['index'][-1]+1, dtype=float)
ohlcv_index_trade_close_arr[trade_source.data['index']] = trades['ReturnPct']
ohlcv_index_trade_close_arr[trade_source.data['index'][:]] = trades['ReturnPct']
source.add(ohlcv_index_trade_close_arr, 'return_pct')
trade_source.add(returns_long, 'returns_long')
trade_source.add(returns_short, 'returns_short')
Expand Down