Thanks your reply did solve my problem both using the __init_method and using the next metod. Thanks for pointing out the link.
However the next issue I ran into is the limitiation of buying at open and sell att close. As I understand there is no way to check if there is a gap and if there is buy at the same opening price that was used to calculate if there is a gap and then sell at close? Buy default this strategy would check for a gap at day 0 and then execute the order at day 1?
Is this correct and is it possible sidestep this and implement a strategy that buy at the current open in backtrader?
There are no similarities between pyalgotrader and backtrader beyond the usage of Python. The source code of pyalgotrade wasn't even looked at/into to get a reference. Not that there was the need for a clean room implementation, simply because fresh ideas sometimes come from not looking at the ideas from other people.
As such there would be no porting from the broker implementation pyalgotrade has. It would have to be an implementation from scratch and at the moment it isn't planned.