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.

130

INTRODUCTION TO AMIBROKER’S AFL

FIGURE 4.13 A 3D optimization chart.

Source: AmiBroker

myValue = (H + L)/2;

if (C > myValue){

Buy = 1;

}

If you type this and check the syntax, you will receive the following message:

Condition in IF, WHILE, FOR statements has to be Numeric or

Boolean type.

Basically, you are asking AmiBroker to compare the close array with myValue

array. You were probably thinking you were comparing the current close price to

the current value in myValue, but you weren’t. Forget about using if’s in your

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!