Moving Average Zone Indicator (MAZI) - Complete!

Now with adjustable settings!

The MAZI (Moving Average Zone Indicator) is a slow updating moving average calculation of key high and low points in the market, which is a unique approach to sampling moving averages.
The indicator tracks only the key candles that provide good information about price movement, which distinguishes it from other moving average indicators that record a new data point with every bar that prints.
The length of the MAZI is determined by the number of key price points to reference in the average equation, not the number of candles to look at.

We have included our very own unique addition besides the ability to adjust the settings which is called: Standard Deviation Zones

Standard Deviation Zones:
A standard deviation takes a set of values and tells you with a certain level of confidence that with those data points where a potential next data point could land.
When we take our key pivot high and key pivot low points and calculate standard deviations away from them.
We can more confidently predict where the next turn around will be.
Of course the market is always changing and this is not a sure thing but it will still help us get an idea of what places for the next pivot is reasonable.
At the same time if the price breaks above the top standard deviation lines and below the bottom ones it’s a clear sign of a significant move or change in the market

The MAZI band uses specific candle conditions to sample the highs and lows of specific candles to calculate the top and bottom moving averages.
If the close of a candle is lower than the close of the previous two candles, the high of the previous candle is recorded as a potential pivot value.
If the close of a candle is higher than the close of the previous two candles, the low of the previous candle is recorded as a potential pivot value.
These pivot values are adjustable!

The upper and lower bounds of the moving average zone are calculated as one and two standard deviations away from the moving averages, respectively.
The MAZI provides a unique perspective on price movement that can help traders identify key zones of support and resistance.
The MAZI’s equation gives traders 5 crucial points of interest: the direction of the zone, the top of the zone, the middle of the zone, the bottom of the zone, and the height of the zone.

How to use each point of interest

The Direction:
Because we don’t use every candle for input into our calculations, the direction of the indicator will not change with insignificant moves in the markets allowing you to catch when something is a pull back vs when it is a real direction change.
We have also included 3 easy to read colors allowing you to gauge when direction is going down, flat, or up, by alternating the color of the zone between red, white, and green respectively.

The Top of the Zone:
The top of the zone represents where price would be expected to not go over given the length of the bars being calculated.
So this tells you that if the zone is red and the highs are not breaking over the top of the zone, the market is behaving as expected and it should continue down.
On the other hand, if price does break over the top of the zone it signifies stronger than expected buying power and price movement.
The strongest indication of strong upward movement is when the top of the zone becomes an area of price support.
So when you see a candle come down from above the zone and turn around near the top of the zone there is likely a strong upward move coming.
Unless there is a very strong trend it is best to only take this trade the first time price breaks the top side and forms support.
On a range day this is not likely to happen multiple times in a row without price testing the bottom side in between.

The Middle of the Zone:
The middle of the zone is used as a general no trade zone.
Because price is inbetween where the expected high and low of price should be there is no good indicator of which way price will break out.
That does not mean you cannot find worthwhile patterns in the middle of the zone but as a general rule and a very good rule for beginner traders is to avoid entering a trade inside the zone all together.

The Bottom of the Zone:
The bottom of the zone is used similarly to the top of the zone.
If the zone is green and lows are not going below the bottom of the zone the shows you that sellers are not breaking below the expected price and therefore you can expect the price to continue moving up.
On the other hand if price breaks below the low part of the zone then it shows you that sell’s have pushed price below the expected low and therefore is currently under strong selling pressure.
The strongest signal for a big downward move is when the low of the zone (the expected bottom of where price should be given the length of the indicator) turns into a resistance area for price.
When a candle comes up from underneath the zone and fails to break into the zone and starts to drop again, that is the best signal for a big downward move.
Unless there is a very strong trend it is best to only take this trade the first time price breaks the bottom side and forms resistance.
On a range day this is not likely to happen multiple times in a row without price testing the top side in between.

The Size of the Zone:
The size of the zone is very important to keep in mind when gauging profit targets and stop loss levels.
When the market is forming trending patterns the height of the zone will grow.
When the market is showing signs of ranging it will start to shrink.
In other words the smaller the zone the smaller your profit target should be (and the tighter stop you should have).
A zone with a large height shows that we have much larger moves requiring wider stops and its more likely to hit larger profit targets.

Where traders grow!

Welcome to our discord server to interact with other traders and us!
We would love to hear from you!
Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact bonsaiitrading for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Author's instructions

Reach out to us trough DM or in our discord channel. Check our description to find more information.

Want to use this script on a chart?

Warning: please read before requesting access.