Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 491ef00

Browse filesBrowse files
Fix read-only array error in FractionalBacktest indicator scaling
1 parent 6e9016c commit 491ef00
Copy full SHA for 491ef00

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎backtesting/lib.py‎

Copy file name to clipboardExpand all lines: backtesting/lib.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ def run(self, **kwargs) -> pd.Series:
552552
trades[['EntryPrice', 'ExitPrice', 'TP', 'SL']] /= self._fractional_unit
553553

554554
indicators = result['_strategy']._indicators
555-
for indicator in indicators:
555+
for i, indicator in enumerate(indicators):
556556
if indicator._opts['overlay']:
557-
indicator /= self._fractional_unit
557+
indicators[i] = indicator / self._fractional_unit
558558

559559
return result
560560

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.