31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This is where you can change the values of the avgLen parameter. Change it to

50 and click OK. I get the sense that AmiBroker was originally designed to trade

equities only, so you have to set up the backtester to work with futures data by going

into the Settings button in an Analysis sheet. Only do this if you are truly testing

futures data. If you aren’t, then just skip this paragraph. The Settings button has a

small picture of wrench and screwdriver and is located directly to the left of the

Parameters button. A dialog box like the one in Figure 4.10 should open. Click

on the box beside the Futures mode option. It instructs AmiBroker’s back-tester

to use the margin deposit and point value that was set up when the database was

created for its calculations.

Now click the Backtest button (five buttons to the left of the Parameter icon).

This will apply the algorithm to the data and create a trade-by-trade report in the

analysis window. If you have a database loaded as I do and you select the Portfolio

Backtest, then the algorithm will be applied to all of the markets in the database.

Don’t be surprised if this only takes a few seconds. AmiBroker is really applying the

algorithm to every single bar of data in the portfolio. Figure 4.11 and Figure 4.12

127

INTRODUCTION TO AMIBROKER’S AFL

FIGURE 4.10

Set Futures mode.

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!