How to set a moving average alert
A moving average turns a jumpy price into a line, and the moment to know about is the price crossing it. Here is how to be told, in one sentence.
A moving average is the simplest thing on a chart after the price itself, and the moment people care about is always the same one: the price getting to the other side of it. That moment can be weeks away, which makes it a poor thing to watch for and a good thing to be told about.
What a moving average is
Take the closing prices of the last 50 days and average them. Tomorrow, drop the oldest and add the newest. The line that results is the 50-day moving average. It moves in the direction of the price, later and more smoothly.
Three lengths come up more than any others: 20 days for the short run, 50 for the middle, and 200 for the long. A price above its 200-day average is above what it has averaged over most of a year.
A simple average counts every day the same. An exponential one, the EMA, counts recent days for more, so it turns sooner.
The sentence
In Whistle AI an alert is a sentence:
Alert me when Nvidia crosses above its 50-day average
It is read as Nvidia's close crossing above its 50-day average, counted in days. It is checked each time a day's bar closes, and you are told on the day it happens.
The other side is the same sentence turned round:
Tell me when Apple crosses below its 200-day average
For an exponential average, say so:
Tell me when Tesla closes above its 20-day EMA
An average with no length given is taken as 20 bars.
Above it, or crossing it
"Crosses above" is the bar on which the price gets there. "Is above" or "closes above" is where the price is, for as long as it stays. On its own, an alert of either kind is told once, when the price arrives.
The difference shows when the average is one part of a larger alert. Here it is a setting and not the moment itself:
Tell me when Microsoft is above its 200-day average and its RSI is below 30
That is told when both are true: a dip, but only inside a longer rise. There is more on joining conditions in the guide to the RSI.
A distance from the average
Some people care less about the crossing than about how far the price has run from its average. A percent can be said:
Tell me when Amazon is 5% below its 50-day average
On a faster chart
An average counts bars, and the bars need not be days. Name the bar, and the 50 counts bars of that size:
Tell me when Bitcoin crosses above its 50-bar average on hourly bars
Whistle AI has bars of 15 minutes, 30 minutes, an hour and a day.
Two averages crossing
The best known signal made of two moving averages is the golden cross, the 50-day crossing above the 200-day. It has a guide of its own. Any two lengths can be asked for in the same way.
As a rule with a buy and a sell
One average gives a pair of moments, and a sentence can hold both:
Buy Microsoft when it closes above its 200-day average, sell when it closes below it
Then the alert gives a buy signal and, later, a sell signal. This pair is among the ready-made signals in the app, under the name Ride the trend. Whistle AI places neither trade. It tells you when your rule says so, and what you do then is yours to decide, at your own broker.
Things to know before you rely on one
- A price that sits on its average crosses it again and again. In a market going sideways, expect a run of alerts that lead nowhere. A longer average crosses less often.
- An average needs history. There is no 200-day average until there are 200 days of prices.
- It is checked at the close. A price that pokes through the average during the day and closes back on the old side has not crossed.
- A signal is a fact about a price, not a forecast. A cross says where the price is against its own recent past, and nothing about tomorrow.
- Alerts can be late or missing. Prices come from outside providers, and any service can fail.
Questions people ask
Which moving average should the alert use?
There is no right one. The 50-day and the 200-day are the two most often quoted, and a shorter one such as the 20-day reacts sooner and crosses more often.
Is it a simple or an exponential average?
Simple, unless the sentence says "EMA" or "exponential".
Will it tell me every day the price stays above the average?
No. You are told when it gets there.
Can it use weekly bars?
No. Bars are 15 minutes, 30 minutes, an hour or a day. A 50-week average is close to a 250-day one, which can be asked for.