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 floatParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
value | float | Yes | — | Amount in the account currency. |
Returns
series floatExample
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.