Results
How the N DMA calculator works
A daily moving average (DMA) is the average of the last N daily closing prices. The "N" is a number you choose. A 50 DMA averages the last 50 closes, and a 21 DMA averages the last 21. Each new day, the oldest close drops out and the newest is added, so the line moves with the price but more smoothly. A small N follows price closely. A large N is slower and shows the bigger trend.
The formula
N DMA = (sum of the last N daily closes) divided by N.
How the signal is decided
- Buy: the latest close is above the N DMA and the N DMA has risen by more than 0.1% over the last 5 days.
- Sell: the latest close is below the N DMA and the N DMA has fallen by more than 0.1% over the last 5 days.
- Neutral: anything else, such as price above an average that is falling or flat.
The signal uses fixed rules and the same numbers always give the same answer. It is a plain reading of one indicator, not a prediction.
Comparing two averages
If you enter a second N, the page shows which average is higher and when they last crossed. When a shorter average crosses above a longer one, traders call it a bullish crossover. When the 50 DMA crosses above the 200 DMA it is called a golden cross, and the reverse is a death cross.
Common questions
What N should I choose?
There is no correct N. Short traders often look at 5 to 20 days, swing traders at 20 to 50, and long-term investors at 100 or 200. Try the N that you or others in your market watch, because many people react to the same lines.
Why does it say there are not enough bars?
An N DMA needs at least N daily closes. Choose a longer history length at the top of the page, or use a smaller N. The longest history is 10 years.
How is this different from the DMA calculator?
The DMA calculator shows several standard averages (20, 50, 100, 200) together. This one is for a single N that you choose, with a plain explanation of where price sits against it and a detailed table of every day.
Is this advice?
No. A moving average describes past prices only. It lags behind price and can give false signals in sideways markets. It is for information only.