Skip to content

Commit 1494396

Browse files
authored
Remove y-axis scaling logic for PnL graph kernc#356
1 parent 97712c7 commit 1494396

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

backtesting/_plotting.py

-3
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,6 @@ def _plot_pl_section():
391391
returns_short = np.where(trades['Size'] < 0, trades['ReturnPct'], np.nan)
392392
size = trades['Size'].abs()
393393
size = np.interp(size, (size.min(), size.max()), (8, 20))
394-
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']
396-
source.add(ohlcv_index_trade_close_arr, 'return_pct')
397394
trade_source.add(returns_long, 'returns_long')
398395
trade_source.add(returns_short, 'returns_short')
399396
trade_source.add(size, 'marker_size')

0 commit comments

Comments
 (0)