Adrian Reid explains Amibroker's 'Add Artificial Future Bar' backtest setting: it copies the last bar as a fake next-day bar so signals generated today can be executed 'tomorrow' in backtests. He describes that the resulting opening price and share count are estimates and gives two practical methods to estimate the number of shares to buy at next open (use pre-market/market depth or divide intended dollar amount by yesterday's close, the latter being his preferred approach).
So what happens is when your system gets a signal today and enters tomorrow, it's a one day delay between the signal and the entry. If you do a backtest just normally up until today, the backtest won't show you that there's a new trade that is that needs to be opened tomorrow because it's only showing you the trades that are open up until today.
So in the analysis settings there's a box that you tick saying that says add artificial future bar to show tomorrow's trade picks. And what it does is it runs the backtest, but on the last bar of the backtest it takes today's bar and copies it to tomorrow and pretends that there's a bar tomorrow. And so the back test will see the signal today and then execute the signal tomorrow on the fake bar. So that in your backtest results you can see, oh, there's a trade that's going to open tomorrow and you have to open that trade. So the opening price and the number of shares is an estimate based on today's price. So it's not, it's not perfect. And so tomorrow at the open, the most accurate way to do it is to say, okay, where is the price now in the market depth before the market opens? And say okay, well it's going to open about here. So therefore that's going to be the price. And then divide the value by the number by the price to get you the number of shares.
The other way you can do it, which is slightly less accurate but pretty close, is by saying, okay, I know I need to buy $500 worth. What was the close yesterday? Do $500 worth divided by the close yesterday. That gives you the number of shares, which is pretty close. To be honest, that's what I do.