Market variables reference

All 16 market variables in AlgoBarsX, each with its parameters, defaults, ranges and an example: market.symbol, market.name, market.category, market.pip_size, market.point_size, market.contract_size, market.lot_min, market.lot_max, market.lot_step, market.leverage_tiers and 6 more.

market.symbol market.name market.category market.pip_size market.point_size market.contract_size market.lot_min market.lot_max market.lot_step market.leverage_tiers market.currency_base market.currency_quote market.session market.is_open market.next_open market.next_close

market.symbol→ symbol#

Symbol the script runs on.

Example
sym = market.symbol
strategyindicatoralertlibrarysince 1.0

market.name→ string#

Display name.

Example
title = market.name
strategyindicatoralertlibrarysince 1.0

market.category→ string#

forex, crypto, index, commodity or stock.

Example
asset_class = market.category
strategyindicatoralertlibrarysince 1.0

market.pip_size→ distance#

Price size of one pip.

Example
pip = market.pip_size
strategyindicatoralertlibrarysince 1.0

market.point_size→ distance#

Price size of one point.

Example
point = market.point_size
strategyindicatoralertlibrarysince 1.0

market.contract_size→ number#

Units per lot.

Example
units = market.contract_size
strategyindicatoralertlibrarysince 1.0

market.lot_min→ lots#

Smallest order size.

Example
smallest = market.lot_min
strategyindicatoralertlibrarysince 1.0

market.lot_max→ lots#

Largest order size.

Example
largest = market.lot_max
strategyindicatoralertlibrarysince 1.0

market.lot_step→ lots#

Size increment.

Example
increment = market.lot_step
strategyindicatoralertlibrarysince 1.0

market.leverage_tiers→ list<LeverageTier>#

Leverage by position size.

Example
tiers = market.leverage_tiers
strategyindicatoralertlibrarysince 1.0

market.currency_base→ string#

Base currency.

Example
base_ccy = market.currency_base
strategyindicatoralertlibrarysince 1.0

market.currency_quote→ string#

Quote currency.

Example
quote_ccy = market.currency_quote
strategyindicatoralertlibrarysince 1.0

market.session→ Session#

Trading session times and time zone.

Example
hours = market.session
strategyindicatoralertlibrarysince 1.0

market.is_open→ bool#

True while the market is open.

Example
trading_now = market.is_open
strategyindicatoralertlibrarysince 1.0

market.next_open→ time#

Next open time.

Example
reopens = market.next_open
strategyindicatoralertlibrarysince 1.0

market.next_close→ time#

Next close time.

Example
closes = market.next_close
strategyindicatoralertlibrarysince 1.0

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account