Major update bringing the indicator to Pine Script v6 with improved code structure and a new external trend direction output that other indicators can use as a filter.
Any 8 Moving Averages is a free TradingView indicator that puts 8 independently configurable MAs on your chart. Choose EMA, SMA, HMA, WMA, VWMA, or RMA for each. Lines and clouds change color as price moves above or below each level. Includes cross alerts, a percentage gap table, and an external trend signal other indicators can use as a filter.
WHAT IT DOES
Eight independently configurable moving averages with color-changing lines, clouds, a percentage gap table and cross alerts. Everything you need to track trend direction and distance from key levels at a glance.
Each of the 8 moving averages can be individually set to any type: EMA, SMA, HMA, WMA, VWMA or RMA. You can change the length, colors and type of each one independently, and turn off any you don’t need so you only see the moving averages that matter for your setup.
Each moving average paints green when price is above it and red when price is below it. Colored clouds fill the space between price and each moving average, giving you an instant visual read on whether price is trading above or below each level and how far away it is.
An on-chart table shows how far away price is from each moving average as a percentage, with each row color-coded to match its corresponding moving average. The table can be repositioned to different areas of the chart or turned off entirely if you don’t need it.
You can set alerts for when price crosses each moving average. This lets you get notified of key level breaks without watching the chart.
Added in the April 2025 update, this feature sends an overall trend direction signal that other indicators can read as a filter. Any moving average that is turned on counts toward the signal. If the close price is above all enabled moving averages, it outputs a bullish value of 1. If below all, it outputs a bearish value of -1. If mixed, it outputs a neutral value of 0. The output is labeled “Trend Direction To Send To External Indicators.”
INTERPRETATION GUIDE
Before taking a trade, check the percentage gap table to make sure there is a big enough distance to the next moving average. If the gap is too small, the risk/reward on the trade may not be worth it. Trade in the direction of the trend and use the percentage gaps to gauge how much room price has to move before hitting the next level.
CONFIGURATION
Each of the 8 moving averages has its own group of settings. You can configure them independently to build the exact moving average structure you want on your chart.
| Setting | Default | Description |
|---|---|---|
| MA Type (per MA) | Varies | The type of moving average to use. Options: EMA, SMA, HMA, WMA, VWMA, RMA. |
| Length (per MA) | Varies | The lookback period for the moving average calculation. |
| On/Off (per MA) | On | Toggle each moving average on or off individually. |
| Colors (per MA) | Green/Red | Custom colors for the bullish and bearish states of each moving average line and cloud. |
| Percentage Table | On | Toggle the percentage gap table on or off. |
| Table Position | Top Right | Move the percentage gap table to different areas on the chart. |
GOOD TO KNOW
FREE ON TRADINGVIEW
Add it to your TradingView charts and start tracking trend direction across multiple moving averages today. No subscription required.
COMMON QUESTIONS
CHANGELOG
Major update bringing the indicator to Pine Script v6 with improved code structure and a new external trend direction output that other indicators can use as a filter.
Updated the percentage gap table so that each row's background color matches the color of its corresponding moving average, making it easier to identify each one at a glance.
Added the ability to turn the percentage gap table on or off for users who don't need that information on their chart.
Added the ability to move the percentage gap table to different areas on the chart.
EXPLORE MORE
Free
A combined moving average overlay with squeeze detection and volume spike signals. Pairs well for traders who want moving average confluence plus momentum triggers.
Free
Multi-indicator trend direction table in one view. Use alongside the moving average cloud to see trend alignment across different indicator types at a glance.
Free
Measures the strength of the current trend. Complements the moving average cloud by telling you not just the direction but how strong the trend is behind it.