Skip to content
Permalink
Browse files

Use compensating data for trade updates

  • Loading branch information...
mementum committed Mar 11, 2017
1 parent 4f18ad3 commit d9c06f4c17d705faf5254a8211066dab3671a73d
Showing with 4 additions and 1 deletion.
  1. +4 −1 backtrader/strategy.py
@@ -442,7 +442,10 @@ def _addnotification(self, order):
if not order.executed.size:
return

tradedata = order.data
tradedata = order.data._compensate
if tradedata is None:
tradedata = order.data

datatrades = self._trades[tradedata][order.tradeid]
if not datatrades:
trade = Trade(data=tradedata, tradeid=order.tradeid,

0 comments on commit d9c06f4

Please sign in to comment.
You can’t perform that action at this time.