mirror of
https://github.com/Ichinga-Samuel/aiomql.git
synced 2026-08-18 14:28:08 +00:00
1.9 KiB
1.9 KiB
Table of Contents
aiomql.contrib.symbols.forex_symbol
ForexSymbol Objects
class ForexSymbol(Symbol)
Subclass of Symbol for Forex Symbols. Handles the conversion of currency and the computation of stop loss, take profit and volume.
pip
@property
def pip()
Returns the pip value of the symbol. This is ten times the point value for forex symbols.
Returns:
float- The pip value of the symbol.
compute_points
def compute_points(*, amount: float, volume: float) -> float
Compute the number of points required for a trade. Given the amount and the volume of the trade.
Arguments:
amountfloat - Amount to tradevolumefloat - Volume to trade
compute_volume_points
async def compute_volume_points(*,
amount: float,
points: float,
round_down: bool = False) -> float
Compute the volume required for a trade. Given the amount and the number of points.
Arguments:
amountfloat - Amount to tradepointsfloat - Number of pointsround_down- round down the computed volume to the nearest step default True