OPEN-SOURCE SCRIPT

$TUBR: 7-25-99 Moving Average

Actualizado
7, 25, and 99 Period Moving Averages


This indicator plots three moving averages: the 7-period, 25-period, and 99-period Simple Moving Averages (SMA). These moving averages are widely used to smooth out price action and help traders identify trends over different time frames. Let's break down the significance of these specific moving averages from both supply and demand perspectives and a price action perspective.

1. Supply and Demand Perspective:
- 7-period Moving Average (Short-Term):
The 7-period moving average represents the short-term sentiment in the market. It captures the rapid fluctuations in price and is heavily influenced by recent supply and demand changes. Traders often look to the 7-period SMA for immediate price momentum, with price moving above or below this line signaling short-term strength or weakness.

- Bullish Supply/Demand: When price is above the 7-period SMA, it suggests that buyers are currently in control and demand is higher than supply. Conversely, price falling below this line indicates that supply is overpowering demand, leading to a short-term downtrend.
Is current price > average price in past 7 candles (depending on timeframe)? This will tell you how aggressive buyers are in short term.

- Key Supply/Demand Zones: The 7-period SMA often acts as dynamic support or resistance in a trending market, where traders might use it to enter or exit positions based on how price interacts with this level.

- 25-period Moving Average (Medium-Term):
The 25-period SMA smooths out more of the noise compared to the 7-period, providing a more stable indication of intermediate trends. This moving average is often used to gauge the market's supply and demand balance over a broader timeframe than the short-term 7-period SMA.

- Supply/Demand Balance: The 25-period SMA reflects the medium-term equilibrium between supply and demand. A crossover between the price and the 25-period SMA may indicate a shift in this balance. When price sustains above the 25-period SMA, it shows that demand is strong enough to maintain an upward trend. Conversely, if the price stays below it, supply is likely exceeding demand.
Is current price > average price in past 25 candles (depending on timeframe)? This will tell you how aggressive buyers are in mid term.

- Momentum Shift: Crossovers between the 7-period and 25-period SMAs can indicate momentum shifts between short-term and medium-term demand. For example, if the 7-period crosses above the 25-period, it often signifies growing short-term demand relative to the medium-term trend, signaling potential buy opportunities. What this crossover means is that if 7MA > 25MA that means in past 7 candles average price is more than past 25 candles.

- 99-period Moving Average (Long-Term):
The 99-period SMA represents the long-term trend and reflects the market's supply and demand over an extended period. This moving average filters out short-term fluctuations and highlights the market's overall trajectory.

- Long-Term Supply/Demand Dynamics: The 99-period SMA is slower to react to changes in supply and demand, providing a more stable view of the market's overall trend. Price staying above this line shows sustained demand dominance, while price consistently staying below reflects ongoing supply pressure.
Is current price > average price in past 99 candles (depending on timeframe)? This will tell you how aggressive buyers are in long term.

- Market Trend Confirmation: When both the 7-period and 25-period SMAs are above the 99-period SMA, it signals a strong bullish trend with demand outweighing supply across all timeframes. If all three SMAs are below the 99-period SMA, it points to a bear market where supply is overpowering demand in both the short and long term.

2. Price Action Perspective:
- 7-period Moving Average (Short-Term Trends):
The 7-period moving average closely tracks price action, making it highly responsive to quick shifts in price. Traders often use it to confirm short-term reversals or continuations in price action. In an uptrend, price typically stays above the 7-period SMA, whereas in a downtrend, price stays below it.

- Short-Term Price Reversals: Crossovers between the price and the 7-period SMA often indicate short-term reversals. When price breaks above the 7-period SMA after staying below it, it suggests a potential bullish reversal. Conversely, a price breakdown below the 7-period SMA could signal a bearish reversal.

- 25-period Moving Average (Medium-Term Trends):
The 25-period SMA helps identify the medium-term price action trend. It balances short-term volatility and longer-term stability, providing insight into the more persistent trend. Price pullbacks to the 25-period SMA during an uptrend can act as a buying opportunity for trend traders, while pullbacks during a downtrend may offer shorting opportunities.

- Pullback and Continuation: In trending markets, price often retraces to the 25-period SMA before continuing in the direction of the trend. For instance, if the price is in a bullish trend, traders may look for support at the 25-period SMA for potential continuation trades.

- 99-period Moving Average (Long-Term Trend and Market Sentiment):
The 99-period SMA is the most critical for identifying the overall market trend. Price consistently trading above the 99-period SMA indicates long-term bullish momentum, while price staying below the 99-period SMA suggests bearish sentiment.

- Trend Confirmation: Price action above the 99-period SMA confirms long-term upward momentum, while price action below it confirms a downtrend. The space between the shorter moving averages (7 and 25) and the 99-period SMA gives a sense of the strength or weakness of the trend. Larger gaps between the 7 and 99 SMAs suggest strong bullish momentum, while close proximity indicates consolidation or potential reversals.

- Price Action in Trending Markets: Traders often use the 99-period SMA as a dynamic support/resistance level. In strong trends, price tends to stay on one side of the 99-period SMA for extended periods, with breaks above or below signaling major changes in market sentiment.

Why These Numbers Matter:

7-Period MA: The 7-period moving average is a popular choice among short-term traders who want to capture quick momentum changes. It helps visualize immediate market sentiment and is often used in conjunction with price action to time entries or exits.

- 25-Period MA: The 25-period MA is a key indicator for swing traders. It balances sensitivity and stability, providing a clearer picture of the intermediate trend. It helps traders stay in trades longer by filtering out short-term noise, while still being reactive enough to detect reversals.

- 99-Period MA: The 99-period moving average provides a broad view of the market's direction, filtering out much of the short- and medium-term noise. It is crucial for identifying long-term trends and assessing whether the market is bullish or bearish overall. It acts as a key reference point for longer-term trend followers, helping them stay with the broader market sentiment.

Conclusion:
From a supply and demand perspective, the 7, 25, and 99-period moving averages help traders visualize shifts in the balance between buyers and sellers over different time horizons. The price action interaction with these moving averages provides valuable insight into short-term momentum, intermediate trends, and long-term market sentiment. Using these three MAs together gives a more comprehensive understanding of market conditions, helping traders align their strategies with prevailing trends across various timeframes.

------------- RULE BASED SYSTEM ---------------
Overview of the Rule-Based System:
This system will use the following moving averages:
  1. 7-period MA: Represents short-term price action.
  2. 25-period MA: Represents medium-term price action.
  3. 99-period MA: Represents long-term price action.


1. Trend Identification Rules:

Bullish Trend:
The 7-period MA is above the 25-period MA, and the 25-period MA is above the 99-period MA.

This structure shows that short, medium, and long-term trends are aligned in an upward direction, indicating strong bullish momentum.

Bearish Trend:

The 7-period MA is below the 25-period MA, and the 25-period MA is below the 99-period MA.

This suggests that the market is in a downtrend, with bearish momentum dominating across timeframes.

Neutral/Consolidation:

The 7-period MA and 25-period MA are flat or crossing frequently with the 99-period MA, and they are close to each other.

This indicates a sideways or consolidating market where there’s no strong trend direction.

2. Entry Rules:


Bullish Entry (Buy Signals):
Primary Buy Signal:
The price crosses above the 7-period MA, AND the 7-period MA is above the 25-period MA, AND the 25-period MA is above the 99-period MA.

This indicates the start of a new upward trend, with alignment across the short, medium, and long-term trends.

Pullback Buy Signal (for trend continuation):

The price pulls back to the 25-period MA, and the 7-period MA remains above the 25-period MA.
This indica
tes that the pullback is a temporary correction in an uptrend, and buyers may re-enter the market as price approaches the 25-period MA.

You can further confirm the signal by waiting for price action (e.g., bullish candlestick patterns) at the 25-period MA level.

Breakout Buy Signal:

The price crosses above the 99-period MA, and the 7-period and 25-period MAs are also both above the 99-period MA.

This confirms a strong bullish breakout after consolidation or a long-term downtrend.

Bearish Entry (Sell Signals):

Primary Sell Signal:

The price crosses below the 7-period MA, AND the 7-period MA is below the 25-period MA, AND the 25-period MA is below the 99-period MA.

This indicates the start of a new downtrend with alignment across the short, medium, and long-term trends.

Pullback Sell Signal (for trend continuation):

The price pulls back to the 25-period MA, and the 7-period MA remains below the 25-period MA.

This indicates that the pullback is a temporary retracement in a downtrend, providing an opportunity to sell as price meets resistance at the 25-period MA.

Breakdown Sell Signal:

The price breaks below the 99-period MA, and the 7-period and 25-period MAs are also below the 99-period MA.

This confirms a strong bearish breakdown after consolidation or a long-term uptrend reversal.

3. Exit Rules:

Bullish Exit (for long positions):

Short-Term Exit:
The price closes below the 7-period MA, and the 7-period MA starts crossing below the 25-period MA.

This indicates weakening momentum in the uptrend, suggesting an exit from the long position.

Stop-Loss Trigger:

The price falls below the 99-period MA, signaling the breakdown of the long-term trend.

This can act as a final exit signal to minimize losses if the long-term uptrend is invalidated.

Bearish Exit (for short positions):

Short-Term Exit:

The price closes above the 7-period MA, and the 7-period MA starts crossing above the 25-period MA.

This indicates a potential weakening of the downtrend and signals an exit from the short position.

Stop-Loss Trigger:

The price breaks above the 99-period MA, invalidating the bearish trend.

This signals that the market may be reversing to the upside, and exiting short positions would be prudent.
Notas de prensa
Highly respected MA.
moving_averagemovingaveragecrossoverpriceactionSimple Moving Average (SMA)Support and ResistancesupportandresitanceTrend Analysistubrultimatebullrun

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


También en:

Exención de responsabilidad