Calculates the dominant moving average period by identifying the period that best tracks price movements.
Dynamic Period Calculation:For each bar, it calculates multiple moving averages (from Min_Period to Max_Period) and determines which period fits the price the best.
Best-Fit Period Selection:The period that produces the moving average with the lowest variance relative to price is chosen as the dominant period.
The output is an oscillator showing the dominant period at each point in time.
Patreon article
https://www.patreon.com/posts/dominant-moving-117688490