Daily Moving Averages Oscillator
Jun 3, 2019

The Daily Moving Averages Oscillator indicator provides a streamlined view of higher-timeframe trend data by plotting four daily moving averages and the Kijun-sen on a dedicated sub-pane. This tool allows traders to maintain a clean price chart while monitoring critical daily support and resistance levels across any intraday timeframe.
Usage
The Usage section describes how the script can be used, examples should be provided in this section. This section also focuses on how main settings affect the indicator interpretation and output.
Traders use this indicator to identify directional bias without cluttering the main price action area. By observing the position of the gray price line (a 3-period SMA) relative to the 20, 50, 100, and 200 daily SMAs, users can determine if the current trend is bullish or bearish. For example, if the price line is sustained above all daily averages, the market is in a strong uptrend.
The inclusion of the Kijun-sen (Base Line) offers an additional layer of trend confirmation and potential mean reversion targets. When price crosses these daily levels, it often signals a shift in momentum or a test of major institutional support and resistance.
Details
The script utilizes the request.security function to fetch daily timeframe data regardless of the chart's current resolution. This ensures that the moving averages displayed remain consistent whether the user is viewing a 5-minute or a 4-hour chart.
The gray line represents a fast 3-period moving average of the current price, acting as a proxy for price action to smooth out noise while maintaining reactivity. The indicator also calculates the Kijun-sen based on the highest high and lowest low over a user-defined period (defaulting to 50), providing a mid-point equilibrium level.
Settings
- SMA Length #1-4: Sets the periods for the four daily moving averages (defaulted to 20, 50, 100, and 200).
- Show Labels: Toggles the visibility of the text labels on the right side of the oscillator.
- Label Offset: Adjusts the horizontal displacement of the labels for better visibility.
- Show 20/50/100/200 MA: Individual toggles to display or hide specific daily moving averages.
- Show Kijun: Toggles the visibility of the Kijun-sen line.
- Source: Determines the price data used for the Kijun-sen calculation.
- Resolution: Defines the timeframe for the Kijun-sen calculation (defaulted to Daily).
- Length: The lookback period for the Kijun-sen calculation.
- Offset: Displacement for the Kijun-sen calculation.
- Label Bounces (K): Enables specific labeling for price interactions with the Kijun level.
FAQ
How do I interpret the gray line? The gray line is a 3-period simple moving average of the current price, used to track price movement against the daily averages within the oscillator pane.
Can I use this on a Weekly chart? While the script is optimized to show Daily averages on lower timeframes, it will still function on higher timeframes, though the daily levels may converge or overlap more frequently.
How do I access the Daily Moving Averages Oscillator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.