Symbol and price grid reference
The 7 functions and 25 values of symbol: signature, effects, phase, cost and tested examples.
Facts about the symbol, and the functions that put a price on its tick grid.
Functions#
symbol.price_of#
symbol.price_of([ticks])
The price amount of a number of ticks.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
symbol.snap#
symbol.snap([price])
Rounds a price to the nearest tick of the symbol's price grid.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
- Examples: Stops on the price grid, Loss limit before entry.
symbol.snap_down#
symbol.snap_down([price])
Rounds a price down to the price grid.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
symbol.snap_up#
symbol.snap_up([price])
Rounds a price up to the price grid.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
symbol.ticks#
symbol.ticks([price])
The number of ticks in a price amount.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
- Examples: Loss limit before entry.
symbol.ticks_down#
symbol.ticks_down([price])
The number of whole ticks in a price amount, rounded down.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
symbol.ticks_up#
symbol.ticks_up([price])
The number of whole ticks in a price amount, rounded up.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
Values#
symbol.base_currencysymbol.categorysymbol.contract_sizesymbol.currencysymbol.id— The identifier of the symbol of the chart.symbol.lot_stepsymbol.margin_ratesymbol.max_lotsymbol.min_lotsymbol.namesymbol.pipsymbol.point_valuesymbol.price_scalesymbol.spec_datesymbol.spec_sourcesymbol.swap_longsymbol.swap_modesymbol.swap_shortsymbol.swap_triple_daysymbol.tick— The size of one tick.symbol.tick_valuesymbol.tickersymbol.venuesymbol.volume_typesymbol.zone