In Amibroker when you are generating your trading signals from the backtest there is one important setting that you need to use most of the time. If you get this wrong then your Amibroker trading signals will be wrong… so when should you use the ‘Add Artificial Future Bar’ setting in Amibroker?

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 today just normally, the backtest won’t show you that there’s a new trade that needs to be opened tomorrow because it’s only showing you the trades that are opened up until today. In the analysis settings, there’s a box that you tick saying that says “add artificial future bar” to show tomorrow’s trade picks. 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. Thus, the backtest will see the signal today and then execute the signal tomorrow on the fake bar so that in your backtest results you can see, that there’s a trade that’s going to open tomorrow and you have to open that trade.

The opening price and the number of shares is an estimate based on today’s price, in which it’s not perfect. Hence, tomorrow at the open, the most accurate way to do it is to say, where is the price now in the market depth before the market opens? And say, well it’s going to open about here, therefore that’s going to be the price. Then divide the value by the number of price to get you the number of shares.

The other way you can do it, which is slightly less accurate but pretty closed, is by saying “I know I need to buy $500 worth, what was the close yesterday?” Do $500 worth to divided by the close yesterday that gives you the number of shares, which is pretty close. That’s what I do.

Pin It on Pinterest

Share This

Share This

Share this post with your friends!