Hi all!
I am new to backtrader and countering some difficulty about the transaction part. For some reason I don't know, the execution price for the order is always 0 when I try to run a portfolio strategy, though it looks all good when I step back and test a single stock test strategy.
I printed the open price data supposed to be used, and it seems all right. And I tried both simple buy order and target percent order, both return the same issue.
Hers is the code and result. It would be much appreciated for you help. Thanks very much!
Code:
Result: