Support Board
Date/Time: Thu, 16 Jan 2025 04:47:36 +0000
Post From: Calculation of a moving average that is recalculated after fixed time periods
[2017-10-03 12:50:31] |
equinox - Posts: 11 |
The bar period of my main chart is 1 month.I would like to plot the price average of the 3 past years for every 3-quarter time period on this chart, e.g. the average line would change every 3 quarters for a new calculation of the average of the last 3 year period. This results in horizontal "stair step" lines that change after each 3-quarter period (in contrast to a conventional moving average, which updates the calculation after each bar). Just to try if I could get a result close to what I am looking for, I constructed a source graph with a bar period of 3 quarters and a simple moving average of 12 bars (3 years), and overlaid this study to my target graph (monthly bars). However, in the source graph, it seems I cannot specify 3 quarters as one bar under chart settings. I hope I could make myself understood, any ideas appreciated. |