Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.strategy.convert_to_symbol
On this pageSignatureParametersReturnsExample

Strategy / Reference

alerta.strategy.convert_to_symbol

TradingView-compatible spelling: strategy.convert_to_symbol, runs without warnings

Converts a value in the strategy's account currency to the symbol's currency — the way to size an order from a cash amount. Strategies here keep their money in the symbol's currency, so the value comes back unchanged — exact when both currencies are the same, as on every USDT pair.

alerta.strategy.convert_to_symbol(value) → series float

Parameters

NameTypeRequiredDefaultDescription
valuefloatYes—Amount in the account currency.

Returns

series float

Example

alerta.strategy.convert_to_symbol
//@version=6strategy("Risk sizing")riskCash = strategy.convert_to_symbol(100)if bar_index == 10    strategy.entry("L", strategy.long, qty = riskCash / close)plot(close)

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.