UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

51 lines (50 loc) 1.75 kB
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator"; import { NegativeVolumeIndexIndicator } from "./NegativeVolumeIndexIndicator"; /** * Represents a IgxDataChartComponent Negative Volume Index indicator (NVI) series. * Default required members: Close, Volume * * The `NegativeVolumeIndexIndicator` (NVI) is a finacial indicator frequently used in combination with the PositiveVolumeIndexIndicator. This calculation can be used to identify bull markets. These two indicators are based on the premise that smart money trades on low volume days and less informed or overly optimistic investors trade on high volume days. * * Using this indicator requires setting both the `CloseMemberPath` and `VolumeMemberPath`. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrOrdinalTimeXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrNegativeVolumeIndexIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * volumeMemberPath="Volume" * closeMemberPath = "Close"/> * </IgrDataChart> * ``` * * ```ts * let series = new IgrNegativeVolumeIndexIndicator({name:"series1"}); * series.xAxisName = this.xAxis; * series.yAxisName = this.yAxis; * series.volumeMemberPath= "volume" ; * series.closeMemberPath = "close"; * ``` */ export class IgrNegativeVolumeIndexIndicator extends IgrStrategyBasedIndicator { createImplementation() { return new NegativeVolumeIndexIndicator(); } /** * @hidden */ get i() { return this._implementation; } constructor(props) { super(props); } }