Skip to main content
Table of Contents

TTMSFNCCandleStickChart.AddMovingAverage Method

Adds a moving average line computed from the series at the given index using the specified window size.

API unit family: TMSFNCChart Declaring type: TTMSFNCCandleStickChart Inherited from: TTMSFNCChart

Syntax

FMX.TMSFNCChart.hppPascalC++
function AddMovingAverage(ASerieIndex, AStartX, AEndX, AWindow: Integer; AUseCommonYRange: Boolean = true; ASerieLineColor: TTMSFNCGraphicsColor = gcBlack; ASerieLineWidth: Integer = 1): TTMSFNCChartSerie;
TTMSFNCChartSerie* __fastcall AddMovingAverage(int ASerieIndex, int AStartX, int AEndX, int AWindow, bool AUseCommonYRange = true, TTMSFNCGraphicsColor ASerieLineColor = (System::Uitypes::TAlphaColor)(0xff000000), int ASerieLineWidth = 0x1);

Parameters

Name Description
ASerieIndex Zero-based index of the source series.
AStartX Starting x-axis point index.
AEndX Ending x-axis point index.
AWindow Number of data points used for each averaged value.
AUseCommonYRange When True, the moving average participates in the common y-range calculation.
ASerieLineColor Stroke color for the moving average line.
ASerieLineWidth Stroke width in pixels.

Returns

Returned value.