Dominant Moving Average

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Dominant Moving Average

Postby Apprentice » Tue Dec 10, 2024 8:33 am

SPX500 m5 (12-10-2024 1425).png


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.
Dominant Moving Average.lua
(7.79 KiB) Downloaded 114 times

Dominant Moving Average Period Oscillator.lua
(7.57 KiB) Downloaded 108 times

Patreon article
https://www.patreon.com/posts/dominant-moving-117688490
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38111
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 11 guests