@backtrader Thank you for your help. Yes, it was a data subscription issue. I only have a paper money account and did not want to open a real IB account yet. I also was not sure how to request delayed market data instead of live market data.
I found out that I am allowed to stream forex data as is, so for now I am using that.
Thanks again for your help.
The buy_bracket/sell_bracket methods contain the parameters limitargs and stopargs, which are dictionaries intended to supply specific value for the corresponding orders. You can specify valid for each, both or none of them. And you can use kwargs to affect all of them.
See: Docs - Strategy
I had a similar problem and resolved by canceling the pending order every and then recreating it. This way there's no "weekend problem" when the order for next day is more than one day ahead.
if not self.position:
self.order = self.buy(price = buy_price, exectype = bt.Order.Limit)
self.order = self.close(price = sell_price, exectype = bt.Order.Limit)
Hello all, i finally made some progress on this. at first sight, it seems that upgrading backtrader from version backtrader-126.96.36.199 to backtrader-188.8.131.52 has fixed my issue. this is strange since this feature was added a while back to bt; but anyway, i thought i would post this here in case it can help someone else! happy sunday!
You can use simple strategy which will go thru the data feeds and every next() print available prices.
Check out the docs: Quickstart - Access prices, Multi Example - How to process several data feeds.
Another way - obtain cerebro results after run and extract data feeds from the strategies returned.
Check out the docs: Cerebro - Returning the results
@robin-dhillon said in About Commission:
Thanks Robin, I did some further studies on how to store the commission info. Turns out the easiest way is to use notify_trade nicely.
In order to make all-in-one sizer I've used both cheat-on-open feature and built-in filter which splits the candle in 2 candles: OOOO and OHLC.
With the cheat-on-open feature the broker value from the previous day is used. Which left me sometime with the excessive amount of cash after rebalancing of positions. Filter above gives an opportunity to use broker value recalculated for open price.