Plotting moving average line on a chart

  • Thread starter Thread starter Herbert Chan
  • Start date Start date
H

Herbert Chan

Hello,

I've a weekly chart that shows the weekly candlestick chart for the fund
prices and a 39-week moving average line.

Now, I have so much data that I only want to plot around 2 years' data on
the chart. If I select this range only and let Excel create the moving
average line, the moving average line will only start at 39 weeks into this
2-year period. However, I want this line to start from the start of this
2-year period.

Any way to do this?

Thanks.

Herbert
 
Herbert,

One option is to eliminate the chart generated 39-week moving average line.
Next, add another row or column to your worksheet that contains the
calculation of the 2-year moving average. Finally, add the row or column
that contains the 2-year moving average as an additional series to the chart.

For example, if your data is contained in the range A1:A5, add a formula to
create the moving average to cell B3 like "=AVERAGE(A1:A3)". Copy the
formula from cell B3 down the column to cell B5. Then chart the data in the
range A1:B5.
 
Back
Top