Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Indicator

Indicator's definition used by the application to connect it with UI. Example:

...
module.exports = {
name: "doubleEma",
description: "Double EMA",
calculator: doubleEma,
params: {
slowPeriod: predef.paramSpecs.period(21),
fastPeriod: predef.paramSpecs.period(10)
},
tags: ["My Indicators"],
plots: {
fast: { title: "FastEMA" },
slow: { title: "SlowEMA" },
},
plotter: [
predef.plotters.dots("slow"),
predef.plotters.singleline("fast"),
predef.plotters.custom(dnaLikePlotter)
],
schemeStyles: {
dark: {
fast: {color: "red"},
slow: {color: "lightblue"}
}
}
};

Hierarchy

  • Indicator

Properties

areaChoice: "overlay" | "new"

Default choice for placement. Optional. Default: overlay

calculator: Calculator

Calculation algorithms

description: string

Readable text that used in UI. Optional.

dlls: DLLs

Windows DLL import specification. Can be used in standalone Windows application only.

inputType: "bars" | "volume" | "any"

Expected type of input series. Optional. Default: any

name: string

Unique identifier associated with the indicator.

Set of input parameters. Optional.

plots: Plots

Output results for displaying. Optional. If not specified, the application will expect a numeric output or value field of the output object.

plotter: Plotter

How to plot results. Optional. If not specified, the application will display the results as lines.

requirements: object

Additional requirements for input

Type declaration

  • Optional Readonly volumeProfiles?: boolean

    Chart's symbol history should include volume profiles

scaler: Scaler

How to auto-scale results in the chart area. If not specified, the application will try to fit all plots to the plot area.

schemeStyles: SchemeStyles

Default color/style of plotted results.

tags: readonly string[]

How to group with other similar indicators in UI dropdown menu.

Generated using TypeDoc