SeverinJB / yuzu

0 stars 0 forks source link

'Position' object has no attribute 'avg_entry_price' #22

Closed SeverinJB closed 2 years ago

SeverinJB commented 2 years ago

stragey_scalping calls invalid attribute in def function __get_signal(self, data) > cost_basis = float(position.avg_entry_price)

Screenshot 2022-09-23 at 17 11 05

Alpaca strategy requires avg_entry_price.

Fix by

SeverinJB commented 2 years ago

Fixed with the steps listed above. However, it will have to be optimised if executors behave differently then the current Alpaca.