2026-02-21 07:43:33 +01:00
|
|
|
# forex_symbol
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-27 04:11:38 +01:00
|
|
|
`aiomql.contrib.symbols.forex_symbol` — Forex-specific symbol with pip and volume calculations.
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
## Overview
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-27 04:11:38 +01:00
|
|
|
Extends [`Symbol`](../../lib/symbol.md) with forex-specific logic for pip size
|
|
|
|
|
and volume calculations based on price movements and stop-loss levels.
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
## Classes
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
### `ForexSymbol`
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
> Symbol subclass tailored for forex instruments.
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
Inherits from [`Symbol`](../../lib/symbol.md).
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
| Attribute | Type | Description |
|
|
|
|
|
|-----------|------|-------------|
|
2026-02-27 04:11:38 +01:00
|
|
|
| `pip` | `float` | Pip size for the pair (`point * 10`) |
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
#### Methods
|
2024-11-11 05:56:08 +01:00
|
|
|
|
2026-02-21 07:43:33 +01:00
|
|
|
| Method | Returns | Description |
|
|
|
|
|
|--------|---------|-------------|
|
2026-02-27 04:11:38 +01:00
|
|
|
| `compute_points(amount, volume)` | `float` | Computes points of price movement needed for a given amount and volume |
|
|
|
|
|
| `compute_volume_points(amount, points, round_down=False)` | `float` | Computes lot size from risk amount and point distance |
|
|
|
|
|
| `compute_volume_sl(amount, price, sl, round_down=False)` | `float` | Computes lot size from risk amount, entry price, and stop-loss price |
|