Links

OHCL Data

OHCL is an acronym for open, high, low, close and represents information about the price of a stock during a period of time.
OHCL is the data behind bar charts. Bar charts consist of multiple price bars, with each bar illustrating how the price of an asset or security moved over a specified time period. Each bar typically shows open, high, low, and closing (OHLC) prices.
Your Pluto strategy can access OHCL data through the "data" argument provided to your handle_new_bar method.

The Bar

You can get the current and previous bar. Bars have a few properties.
def handle_new_bar(data, emit, blocks):
data.bar # current bar
data.last_bar # previous bar

Base data

Property Name
Data Type
close
float
open
float
high
float
low
float
vwap
float
volume
int
ticker
string
date

Computed properties

Property Name
Data Type
Notes
is_green
boolean
is_red
boolean
is_doji
boolean
mid
float
the halfway point between open and close
is_tradable
boolean
did the bar occur during tradable premarket, normal hours, or tradable postmarket

Methods

inner_range
float
the percentage move for this bar from open to close