Interface Calculator
Hierarchy
- Calculator
Properties
Methods
Properties
Chart's element description
Type declaration
-
Readonly element
Size: number The size of elements
-
Readonly element
Size Unit: "UnderlyingUnits" | "Volume" | "Range" | "Renko" | "MomentumRange" | "PointAndFigure" Specifies the way chart elements built
-
Readonly underlying
Type: "MinuteBar" | "Tick" | "DailyBar" Type of basis elements that are used to build the chart
-
Readonly with
Histogram: boolean Whether the chart elements include volume profiles
Contract assigned to the indicator
Type declaration
-
Readonly contract: string
Symbol like
ESH1
-
Readonly product: string
Name of product like
ES
-
Readonly tick
Size: number Product's tick size (or minimal price movement)
An object that points to materialized DLLs that were specified in Indicator.dlls
. Each field is an interface object to corresponding DLL. See example of usage
Type declaration
-
[dllName: string]: object
-
[functionName: string]: function
-
-
Parameters
-
Rest ...args: any[]
Returns any
-
-
-
-
An object with user-specified parameters. The indicator specifies a set of parameters in Indicator.params
. When a user adds the indicator's instance to a chart, the app shows an editor that let fill out actual values.
Type declaration
-
[parameterName: string]: number | boolean
Methods
-
The app calls the method with the value returned by
map
to check if the indicator's algorithm considers to filter out some result values. The method should returntrue
if the value should stay. The implementation is optional.Parameters
-
entity: object
-
[fieldName: string]: any
-
Returns boolean
-
-
The application calls the method before running an iteration through input series items. The implementation is optional. Can be used to reset an internal calculation state.
class ema { init() { this.previousMA = undefined; this.initialSum = 0; } ... }
Returns void
-
Implements the algorithm that maps a flow of values from input series to a new series.
... map(d) { return d.value() - this.props.offset; } ...
Parameters
-
entity: InputEntity | BarInputEntity
Single input data
-
index: number
Index of the entity in the input series
-
inputSeries: TimeSeries
Returns number | object & object
The application expects the values in the output series at least match
Indicator.plots
definition.number
returned value is identical to{ value: number }
for a basic single line plot.undefined
returned value transaltes to an empty value in the output Additionally, if the function returns the result as an object, it is possible to specify styling for this particular output item and/or for the corresponding candlestick. See details in Signaling Average True Range tutorial. The function can return as well agraphics
as a part of the result object. TheGraphicsResponse
is a declarative way to create custom plotting. -
Generated using TypeDoc
Indicator's algorithm should implement this interface. The app assigns the properties upon initialization of the calculator instance.