Not really an issue, just wondering, is it possible that, when all conditions are met to initiate a buy order, to tell the backtester at what price I would like to log as that trade's purchase price? The way it works by default is, it uses the latest Close price as the purchase price if trade_on_close=True, however part of my strategies involve timing entries, like for example when the price crosses above a moving average. So technically, I'd like to "purchase" the stock at the moving average price (using this example), and not wait until the bar closes to purchase.
Is this where using either a limit price or stop price in the self.buy() would work? Or is this even possible? :P Thanks!
Not really an issue, just wondering, is it possible that, when all conditions are met to initiate a buy order, to tell the backtester at what price I would like to log as that trade's purchase price? The way it works by default is, it uses the latest Close price as the purchase price if
trade_on_close=True
, however part of my strategies involve timing entries, like for example when the price crosses above a moving average. So technically, I'd like to "purchase" the stock at the moving average price (using this example), and not wait until the bar closes to purchase.Is this where using either a limit price or stop price in the self.buy() would work? Or is this even possible? :P Thanks!