all-in for buy
I ran backtest, and wanted to all-in for one stock. But it needed to set price and size, so I wondered if it could offer all-in mode when I used buy().
@jialeen You can use
order_target_percent(data, target=1)to have BT use 100% of the portfolio value for the size of the order.