UNPKG

igniteui-react-charts

Version:

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

98 lines (97 loc) 3.94 kB
import { __extends } from "tslib"; import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator"; import { SlowStochasticOscillatorIndicator } from "./SlowStochasticOscillatorIndicator"; /** * Represents a IgxDataChartComponent Slow Stochastic Oscillator indicator series. * Default required members: High, Low, Close * * `SlowStochasticOscillatorIndicator` (SSO) displays the closing price relative to the high-low range over a given period of time. There are three types of Stochastic Oscillators: Fast, Slow, and Full. The Stochastic Oscillator is a momentum indicator that shows the relation of the current close price relative to the high/low range over a given time period using a scale of 0 to 100. It is based on the premise that prices will close near 100 in a rising market and closer to 0 in a declining market. * * The Fast Stochastic Oscillator Indicator is used to identify buying or selling divergences. The Slow Stochastic Oscillator uses a 3-day SMA and the Full Stochastic Oscillator is the Slow Stochastic Oscillator with time period. * * Using this indicator requires setting both the `HighMemberPath`, `LowMemberPath` and `VolumeMemberPath`. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrCategoryXAxis name="xAxis" label="Year" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrSlowStochasticOscillatorIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * volumeMemberPath="Volume" * highMemberPath="High" * lowMemberPath="Low" /> * </IgrDataChart> * ``` * * ```ts * let series = new IgrSlowStochasticOscillatorIndicator({name:"series"}); * series.xAxis = this.xAxis; * series.yAxis = this.yAxis; * series.volumeMemberPath = "Volume"; * series.highMemberPath = "high"; * series.lowMemberPath = "low"; * this.chart.series.add(series); * ``` */ var IgrSlowStochasticOscillatorIndicator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrSlowStochasticOscillatorIndicator, _super); function IgrSlowStochasticOscillatorIndicator(props) { return _super.call(this, props) || this; } IgrSlowStochasticOscillatorIndicator.prototype.createImplementation = function () { return new SlowStochasticOscillatorIndicator(); }; Object.defineProperty(IgrSlowStochasticOscillatorIndicator.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrSlowStochasticOscillatorIndicator.prototype, "period", { /** * Gets or sets the moving average period for the current SlowStochasticOscillatorIndicator object. * The typical, and initial, value for SlowStochasticOscillatorIndicator periods is 14. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrCategoryXAxis name="xAxis" label="Year" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrSlowStochasticOscillatorIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * volumeMemberPath="Volume" * highMemberPath="High" * lowMemberPath="Low" * period={10} /> * </IgrDataChart> * ``` */ get: function () { return this.i.acr; }, set: function (v) { this.i.acr = +v; }, enumerable: false, configurable: true }); return IgrSlowStochasticOscillatorIndicator; }(IgrStrategyBasedIndicator)); export { IgrSlowStochasticOscillatorIndicator };