| 544 | super().__init__(data, *args, **kwargs) |
| 545 | |
| 546 | def run(self, **kwargs) -> pd.Series: |
| 547 | with patch(self, '_data', self.__data): |
| 548 | result = super().run(**kwargs) |
| 549 | |
| 550 | trades: pd.DataFrame = result['_trades'] |
| 551 | trades['Size'] *= self._fractional_unit |
| 552 | trades[['EntryPrice', 'ExitPrice', 'TP', 'SL']] /= self._fractional_unit |
| 553 | |
| 554 | indicators = result['_strategy']._indicators |
| 555 | for indicator in indicators: |
| 556 | if indicator._opts['overlay']: |
| 557 | indicator /= self._fractional_unit |
| 558 | |
| 559 | return result |
| 560 | |
| 561 | |
| 562 | # Prevent pdoc3 documenting __init__ signature of Strategy subclasses |