# List Candles

## Description

List Candles Function

The List Candles function provides open high low close (OHLC) information on every timestamp defined by the selected timeframe. When the function is called from the BT menu it will be 200 candles long by default.
This function is required for all BT included indicators.

## Syntax

${\displaystyle fx=BT\_LISTCANDLES(eaid,symbol,granularity,max)}$

## Inputs

eaid

symbol
The pair used. Write it like this “EURUSD” and make sure the pair name matches exactly the name in MetaTrader.

granularity
The timeframe used.

max
The amount of candles you want to list. Newest candle will be on the bottom.

## Outputs

This function will return the following outputs in a 4 x (3+max) square:

Timestamp
Time corresponding to the OHLC price

Open
Open price

High
Highest price

Low
Lowest price

Close
Closing price

## Example Calculations

eaid symbol granularity max RESULT
"tester" "EURCHF" "MN" 1000 It will return 1000 candles at a monthly timeframe for the EURCHF pair in a 4 x 1003 square.
"tester" "USDJPY" "1H" 467 It will return 467 candles at an hourly timeframe for the USDJPY pair in a 4 x 470 square.