Skip to content

Commit 97712c7

Browse files
authored
Fixing build error by adding [:] kernc#356
1 parent 307e4ff commit 97712c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/_plotting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def _plot_pl_section():
392392
size = trades['Size'].abs()
393393
size = np.interp(size, (size.min(), size.max()), (8, 20))
394394
ohlcv_index_trade_close_arr = np.empty(source.data['index'][-1]+1, dtype=float)
395-
ohlcv_index_trade_close_arr[trade_source.data['index']] = trades['ReturnPct']
395+
ohlcv_index_trade_close_arr[trade_source.data['index'][:]] = trades['ReturnPct']
396396
source.add(ohlcv_index_trade_close_arr, 'return_pct')
397397
trade_source.add(returns_long, 'returns_long')
398398
trade_source.add(returns_short, 'returns_short')

0 commit comments

Comments
 (0)