Skip to content
All library documents

Choosing the Price Input for Moving Averages and Indicators

Article Quant Q&A · Author: Traddy

Summary

The document asks which value from an OHLC candle should be used to calculate a simple moving average: the open, close, midpoint, or another price. Its answer is that the choice depends on the intended calculation, while closing prices are the common convention. The linked reference is presented as support for that guidance, but the document does not explain the alternatives in detail or compare their behavior.

The question also asks whether the choice generalizes to other technical indicators, but the response does not provide a broader rule. As a result, this is a brief orientation rather than a complete guide: it establishes that indicator inputs are a design choice and identifies the close as a typical default, while leaving the rationale, consequences, and indicator-specific conventions unexplored.

Key ideas

  • The closing price is the commonly used input for a simple moving average.
  • The appropriate price input depends on the purpose and convention of the calculation.
  • The discussion does not establish one universal input rule for all technical indicators.

Tags

Full text
# compute technical indicators from candle data


# compute technical indicators from candle data












i have a rookie question but can't find the answer anywhere so..what is the right way to compute a simple moving average when you have an array of (open,close,low,high) tuples ? From what i saw so far it is the closing price that must be taken but i'm clearly not sure, i guess it could as well be open, or (open + close)/2, or anything else..Also, can this be generalized to other indicators ?

thank you very much.

## Answer by Traddy (score 1)

https://quant.stackexchange.com/a/19139

got my answer myself, and the answer is: That depends, but people mostly use close price. http://www.macroption.com/calculating-moving-average-prices/

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.