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
Add whitespace after , to fix lint issue #356
  • Loading branch information
zlpatel authored Jun 13, 2021
commit 307e4ffb654698a5274588f71c8fc518ceb60dc8
4 changes: 2 additions & 2 deletions backtesting/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ def _plot_pl_section():
returns_short = np.where(trades['Size'] < 0, trades['ReturnPct'], np.nan)
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 = np.empty(source.data['index'][-1]+1, dtype=float)
ohlcv_index_trade_close_arr[trade_source.data['index']] = trades['ReturnPct']
source.add(ohlcv_index_trade_close_arr,'return_pct')
source.add(ohlcv_index_trade_close_arr, 'return_pct')
trade_source.add(returns_long, 'returns_long')
trade_source.add(returns_short, 'returns_short')
trade_source.add(size, 'marker_size')
Expand Down