Fix regression introduced with 8f537a1c2c271eb5cfc592b373697732597d26d6
which voids the count of lost trades
Allow rollover to distinguish between no values temporarily (with None)
and no values permanently (with False)
Avoid math domain error for negative returns in logarithmic calculations
Fix local variable declaration for compound returns
Fix typo in date2num tz conversion which shows up in direct usage
guys, I have two trades in my back test, the first is long, and the second is short. Both closed by stop trail and get profits. Buy notify_trade just recognize the two as one trade and loss money.
I don't know how to fix it.
def notify_trade(self, trade):
if not trade.isclosed:
self.log('OPERATION PROFIT, GROSS %.2f, NET %.2f' %
Here is log
Starting Portfolio Value: 10000.00
2015-03-18, BUY @price: 2.55
2015-03-25, stopTrail @price: 2.60
2015-06-24, SELL @price: 2.99
2015-06-29, stopTrail @price: 2.77
2015-06-29, OPERATION PROFIT, GROSS -176.28, NET -176.28
ibpy2 is installed and it can import.
But when I test this code:
import backtrader as bt
store = bt.stores.IBStore(port=7497)'
I get the error:
AttributeError: module 'backtrader.stores' has no attribute 'IBStore'
Can someone help me?