Files
aiomql/docs/ticks.md
T
Ichinga Samuel 027f9fd8de add docs
2023-10-11 09:49:06 +01:00

2.8 KiB

aiomql.ticks

Module for working with price ticks.

Tick Objects

class Tick()

Price Tick of a Financial Instrument.

Attributes:

  • time int - Time of the last prices update for the symbol
  • bid float - Current Bid price
  • ask float - Current Ask price
  • last float - Price of the last deal (Last)
  • volume float - Volume for the current Last price
  • time_msc int - Time of the last prices update for the symbol in milliseconds
  • flags TickFlag - Tick flags
  • volume_real float - Volume for the current Last price
  • Index int - Custom attribute representing the position of the tick in a sequence.

set_attributes

def set_attributes(**kwargs)

Set attributes from keyword arguments

Ticks Objects

class Ticks()

Container data class for price ticks. Arrange in chronological order. Supports iteration, slicing and assignment

Arguments:

  • data DataFrame | tuple[tuple] - Dataframe of price ticks or a tuple of tuples

Arguments:

  • flip bool - If flip is True reverse data chronological order.

Attributes:

  • data - Dataframe Object holding the ticks

__init__

def __init__(*, data: DataFrame | Iterable, flip=False)

Initialize the Ticks class. Creates a DataFrame of price ticks from the data argument.

Arguments:

  • data DataFrame | Iterable - Dataframe of price ticks or any iterable object that can be converted to a pandas DataFrame
  • flip bool - If flip is True reverse data chronological order.

ta

@property
def ta()

Access to the pandas_ta library for performing technical analysis on the underlying data attribute.

Returns:

  • pandas_ta - The pandas_ta library

ta_lib

@property
def ta_lib()

Access to the ta library for performing technical analysis. Not dependent on the underlying data attribute.

Returns:

  • ta - The ta library

data

@property
def data() -> DataFrame

DataFrame of price ticks arranged in chronological order.

rename

def rename(inplace=True, **kwargs) -> _Ticks | None

Rename columns of the candle class.

Arguments:

  • inplace bool - Rename the columns inplace or return a new instance of the class with the renamed columns
  • **kwargs - The new names of the columns

Returns:

  • Ticks - A new instance of the class with the renamed columns if inplace is False.
  • None - If inplace is True