In this EasyLanguage & PowerLanguage Tutorial, we’ll talk about the Bars. This tutorial can also be studied by PowerLanguage & MultiCharts users.

Every trading system needs to study the bars, and the developer needs to know how to extract the data from the chart.

EasyLanguage Tutorial:  The Bars

In EasyLanguage and PowerLanguage, there are many reserved words that you can use to send data about the bars to your program.

BarInterval

With BarInterval, you can calculate the bar interval value for intraday charts.

Write an indicator like this:

Plot1(BarInterval);

It’s one line of code. If you put this indicator in a 60min chart, the output will be number 60.

BarType

With BarType reserved word, you can extract the value of the current chart’s interval type.

This is the output number that you could obtain:

CurrentBar

With CurrentBar, you can extract the number of the bar that is currently being calculated.

High – Low – Open – Close values

In every indicator and trading system, you need to know the values of the Opening Price, Closing Price, Low Price, and High Price.

You can use this data with the respective Reserved Words:

Suppose you want to print all Opening Bars Value, just write:

Plot1(Open, “Opening Bars”);

The Output will be:

tutorial easylanguage print the Opening bars value in TradeStation

Volume Data

Many times you need to know the total volume of a daily bar or intraday bar. You can extract five different Volume Data:

There are many other reserved words about the Volume data.

When the stock has options listed and tradable on a market exchange, we can extract a lot of interesting data:

 

 

Do you want to learn EasyLanguage & PowerLanguage for TradeStation and MultiCharts? Start here:

 

 

EasyLanguage References.

Leave a Reply