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.

FIGURE 4.11

The trade-by-trade report.

128

INTRODUCTION TO AMIBROKER’S AFL

FIGURE 4.12

The portfolio results.

provide a snapshot of the trade-by-trade report on the crude oil and the portfolio

results on the entire database.

The results don’t look that great, so let’s test a double moving average crossover

system. Work your way back over to the AFL Editor—it should still be open. Go

under the File menu and create a new formula by clicking on New. Once a blank

Editor window opens, type in the following exactly:

Filter = 1;

PositionSize = MarginDeposit = 1;

avgLen1 = Optimize("Len1",9,9,49,1);

avgLen2 = Optimize("Len2",19,19,99,1);

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!