bar – Instrument prices

class pyalgotrade.bar.Bar(dateTime, open_, high, low, close, volume, adjClose)

An instrument’s prices at a given time.

Parameters:
  • dateTime (datetime.datetime) – The date time.
  • open (float) – The opening price.
  • high (float) – The highest price.
  • low (float) – The lowest price.
  • close (float) – The closing price.
  • volume (float) – The volume.
  • close – The adjusted closing price.
getAdjClose()

Returns the adjusted closing price.

getClose()

Returns the closing price.

getDateTime()

Returns the datetime.datetime.

getHigh()

Returns the highest price.

getLow()

Returns the lowest price.

getOpen()

Returns the opening price.

getSessionClose()

Returns True if this is the last bar for the session, or False otherwise.

getVolume()

Returns the volume.

class pyalgotrade.bar.Bars(barsDict, dateTime)

A group of Bar objects.

getBar(symbol)

Returns a pyalgotrade.bar.Bar.

getDateTime()

Returns the datetime.datetime for this set of bars.

getInstruments()

Returns the instrument symbols.

Previous topic

Documentation for the code

Next topic

dataseries – Basic dataseries classes

This Page