Skip to content
All library documents

Adaptive AFR Moving Average and Price-Based Coloring

Article ProRealCode

Summary

The document presents an adaptive price-following indicator called AFR and a smoothed version, AvgAFR. AFR is initialized from median price, then adjusted on each bar by a proportion of the current custom close: it moves upward when that close is above AFR and downward otherwise. The proportion is controlled by a parameter, while a moving average over a chosen period smooths the AFR series. The indicator colors price points and bar segments according to whether the custom close is above or below AvgAFR, and returns the custom close, AFR, and its average.

This describes a calculation and display method, not a complete trading strategy. The document does not specify parameter values, explain how to select them, or provide backtests or other evidence that the indicator improves decisions. It also gives no entry, exit, or risk rules, so the color changes should not be treated as validated trading signals on the information provided.

Key ideas

  • AFR adjusts toward the custom close by a parameterized proportion when price is above or below it.
  • AvgAFR smooths the AFR series over a selected period.
  • The display colors price marks according to whether the custom close is above AvgAFR.
  • The indicator returns the custom close, AFR, and AvgAFR series.
  • No parameter guidance, trading rules, or performance evidence is provided.

Tags

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