Skip to main content

Crate pine_core

Crate pine_core 

Source

Macros§

impl_output_traits_delegate
Macro to easily implement all output traits by delegating to a base field

Structs§

AlertCondition
An alertcondition(...) declaration or an alert(...) fire — a named alert with a message. frequency is None for alertcondition and Some for alert, which specifies one.
Bar
Represents a single bar/candle of market data
Color
Represents a color with RGBA components
Data
Everything a script needs to know about the market it is running on: the bars themselves, and the symbol they belong to.
DefaultPineOutput
Default implementation of PineOutput that supports all features
DirLoader
A LibraryLoader that reads libraries from directories on disk.
FileResolver
A LibraryLoader backed by an in-memory set of named sources: register a library’s text under a path and import <path> resolves against it.
FillObject
Represents a box drawable object A fill(...) between two plots or hlines.
FootprintRow
A source of market data: given a symbol and a Pine timeframe, produce its bars. One price row of a volume footprint: the price range it spans and the volume traded into the bid (sell) and ask (buy) at that level.
GlobalContext
Chart-wide settings written by global functions like bgcolor/barcolor.
Indicator
The indicator(...) declaration — a script’s identity and display settings.
Input
A declared script input (input.int(...), input.source(...), …).
Label
Represents a label drawable object
Library
The library(...) declaration — marks a script as a reusable library.
LineObject
A trend line drawn between two points, (x1, y1)(x2, y2).
LinefillObject
A fill between two lines (linefill.new).
LogEntry
A log entry with level and message
Ohlcv
One row of raw market data, before it is placed in a series.
PineBox
Plot
Represents a plot output
Plotarrow
Represents a plotarrow output
Plotbar
Represents a plotbar output
Plotcandle
Represents a plotcandle output
Plotchar
Represents a plotchar output
Plotshape
Represents a plotshape output
PolylineObject
A multi-point polyline (polyline.new).
SeriesBuffer
A capped window of past values, newest first.
SymInfo
Symbol information the host supplies for a script run.
Table
A table overlay: a fixed grid of cells anchored to a chart position.
TableCell
One cell of a Table.
Timeframe
The chart timeframe a script runs on, exposed as timeframe.*.
TimeframeError
Why an interval string could not be read as a timeframe.

Enums§

Frequency
How often an alert(...) call re-fires within a bar / across bars.
InputValue
The default value of a declared input, preserved with its type so a host can render the right settings widget.
LogLevel
Log level
PineVersion
The language version a script targets, declared by the //@version=N annotation at the top of a script.
TimeframeUnit
The unit of a Timeframe. Pine writes each as a suffix on the multiplier ("3D", "5S", "1W"); minutes have no suffix ("60").
VersionError
A missing annotation is deliberately not represented here — that is Ok(None) from PineVersion::detect, because choosing what to assume is the caller’s policy, not a failure to resolve.

Constants§

MAX_LOOKBACK
The most values any single call site retains. Matches the lookback Pine allows, and bounds memory when a script asks for an absurd length.

Traits§

AlertConditionOutput
Extension trait for recording declared alert conditions.
BoxOutput
Extension trait for box output
DataProvider
DrawingOutput
One extension trait recording both linefill and polyline drawings, which share a sink since neither carries much state.
FillOutput
Extension trait for recording fill(...) areas.
GlobalOutput
Extension trait for chart-wide globals (bgcolor, barcolor).
InputOutput
Extension trait for recording declared inputs
LabelOutput
Extension trait for label output
LibraryLoader
Loads the source of a library by its import path.
LineOutput
Extension trait for line output
LogOutput
Extension trait for logging output
MetadataOutput
Extension trait for a script’s declaration statement — indicator(...) or library(...) (a script has at most one).
PineOutput
Base trait for all output implementations
PlotOutput
Extension trait for plot-related output
TableOutput
Extension trait for table output

Type Aliases§

ProviderError
The error a DataProvider fails with.