Indicator

View as Markdown

The methods and properties covered in this section are unique to custom indicator development. Indicator configuration properties globally define various behaviors of indicators. All properties have default values and can be overridden by setting them in the OnStateChange() method of the indicator.

See also the “Common” section for more method and properties which are shared by NinjaScript types.

Methods and Properties

MethodDescription
AddLine()Adds line objects on a chart.
AddPlot()Adds plot objects that define how an indicator or strategy data series render on a chart.
BarsRequiredToPlotThe number of bars on a chart required before the script plots.
DisplayInDataBoxDetermines if plot(s) display in the chart data box.
DrawHorizontalGridLinesPlots horizontal grid lines on the indicator panel.
DrawOnPricePanelDetermines the chart panel the draw objects renders.
DrawVerticalGridLinesPlots vertical grid lines on the indicator panel.
IndicatorBaseConverterA custom TypeConverter class handling the designed behavior of an indicator’s property descriptor collection.
IsChartOnlyIf true, any indicator will be only available for charting usage - indicators with this property enabled would for example not be expected to show if called in a SuperDOM or MarketAnalyzer window.
IsSuspendedWhileInactivePrevents real-time market data events from being raised while the indicator’s hosting feature is in a state that would be considered suspended and not in immediate use by a user.
PaintPriceMarkersIf true, any indicator plot values display price markers in the y-axis.
ShowTransparentPlotsInDataBoxDetermines if plot(s) values which are set to a Transparent brush display in the chart data box.