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.

2 > 1 + 10 false

2 < 11

2 + 2/2 * 6 equals 8 not 18

2 + 1 * 6 division first

2 + 6 then multiplication

8 then addition

These examples have all of the elements of numerical or logical expressions. They

are to be evaluated, but they don’t do anything. A statement informs the computer

to do something. When you tell the computer to use an expression and then do

something you have created a complete programming statement. When you assign

the result of an expression to a variable, myVar = x + 2, then you have told the

computer to do something. When you program, you create lines of statements.

■ Price Bar Interface

118

INTRODUCTION TO AMIBROKER’S AFL

A price chart consists of bars built from historical price data. Each individual bar

is a graphical representation of the range of prices over a certain period of time.

A five-minute bar would have the opening, high, low, and closing prices of an

instrument over a five-minute time frame. A daily bar would graph the range of

prices over a daily interval. Bar charts are most often graphed in an open, high,

low, and close format. Sometimes the opening price is left off. A candlestick chart

represents the same data, but in a different format. It provides an easier way to see

the relationship between the opening and closing prices of a bar chart. Other bar

data such as the date and time of the bar’s close, volume, and open interest is also

available for each bar. Since AFL works hand-in-hand with the charts that are created

by AmiBroker, there are many built-in reserved words to interface with the data.

These reserved words were derived from commonly used verbiage in the trading

industry. You can interface with the data by using the following reserved words.

(Note: Each word has an abbreviation and can be used as a substitute.)

Reserved Word Abbreviation Description

Open O Open price of the bar.

High H High price of the bar.

Low L Low price of the bar.

Close C Close price of the bar.

Volume V Number of contracts/shares traded.

OpenInt OI Number of outstanding contracts.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!