Moving Averages (MAs), most commonly displayed as curved lines, are useful in determining trend directions.
They are considered lagging indicators because they rely on past prices to calculate an average movement of price through time.
Any values can be assigned to moving averages. The most popular ones are 20, 50, 100, and 200.
Things to keep in mind : smaller moving averages react faster to price changes than bigger ones; moving averages can act as support or resistance levels; there are different types of moving averages : simple (SMA), exponential (EMA), weighted (WMA), etc.
Let's deconstruct a moving average next to understand how it is calculated.
When a new piece is added to a 5-period moving average, for example, the previous 5 candlestick prices (you can choose between opening / closing / highest / lowest prices, etc) are summed up and divided by the value of the moving average, which in our case is 5.
The resulted value represents the average price of the previous 5 candlesticks and implicitly the value of the new piece that is being added to the moving average. The same calculation process takes place for each piece of the moving average.