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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

134

INTRODUCTION TO AMIBROKER’S AFL

FIGURE 4.16

Add item in AFL Code Wizard.

This is the AFL Code Wizard, and it’s a really cool way to create a trading

algorithm without having to create it from scratch. The interface is really quite

simple, so let’s start by first adding a long entry rule. Click on the words Enter

Long when … and then click on the pencil icon labeled Add Item (Figure 4.16).

This will put the following code in the Edit Rule section and also below the Enter

LongWhen....

Value of Close (now) is greater than 10

Now this is where things get really cool. You can click on the individual words in

the code and change them. Remember MySecondAlgo was a dual moving average

crossover. Click on the words Value of. A list of different functions will appear in

the pane below the Edit Rule pane. Figure 4.17 shows where the list is located.

Click in the pane and select MA - Simple Moving Average. The words

15-bar moving average of will take place of Value of.

15-bar moving average of Close (now) is greater than 10

Now click on the number 10 and go back down to the same pane we selected the

first MA and select MA again. The code will change to:

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!