Moving Averages System - Durbtrade

Moving Averages System - Durbtrade

1 indicator... customizable.

Displays up to 4 independent Moving Averages (MA's) at once.

Each MA can be 1 of 6 "MA Types" : SMA , EMA , WMA , VWMA , HMA , or DEMA .

There are 7 individual fills...
4 "MA/Source Fills" and 3 "MA/MA Fills".

The "Source" is selectable,
and there is a "Source Plot" option
to display a plot of the source.

No max value for MA "Length".
Each MA has what I call a "Length Multiplier",
and each MA has its own "Offset".

The colors of each MA,
as well as the Source Plot,
can be up/down "Color-Changing", or solid.
"Line Thickness" is unlimited.

Each of the 3 "MA/MA Fills" allow you to select which 2 of the 4 MA's to fill between!

All 7 fills are customizable by above/below colors, and opacity.

All 7 fills include a "Color Swap" option,
in the case that you need to switch the display of the above-color to the below-color,
and the below-color to the above-color!

All plots are scripted to be drawn visually in front of all fills!

Lastly, you can turn off the display of the MA plots and the Source Plot...
allowing the display of only fills!



Let's take a more detailed look!

First, let's go through the settings, and how to use the Moving Averages System.

You can divide the Inputs tab of the indicator settings into 3 main sections...
1 - Moving Averages
2 - Source Plot, and MA/Source Fills
3 - MA/MA fills

Let's discuss the first section, which is where we set up our MA's.

Here, we see the parameters for our 4 Moving Averages :

All 4 MA's can be customized here in the following ways...
- Toggle ON/OFF by checking the checkbox
- Length
- Length Multiplier
- Type ( SMA , EMA , WMA , VWMA , HMA , or DEMA )
- Up/Down Color Change ON/OFF
- Line Thickness
- Offset

(The Plot Styles, Up/Down/Solid Colors, and Opacities of all 4 MA's
are customizable under the Style tab of the indicator settings)

There are no maximum value limitations for Length, Line Thickness, and Offset.

Of note, the "Length Multiplier" multiplies the "Length" value by a chosen integer.
This can be used to incrementally scan a wide spectrum of lengths very quickly.
Or it can be used to maintain ratios while increasing the MA display lengths...
just multiply all lengths by the same number.
It can also be used to easily create a moving average ribbon
by using multiple Moving Average Systems all at once.
Or, it can be another method to set up higher-timeframe MA's on a lower-timeframe chart...
for example, if both the chart and indicator are on the 1Hour timeframe,
you can multiply all of your set lengths by 24
to see the 1Day MA's of those same lengths on the 1Hour chart.

Next, lets look at the second section of the Inputs tab of the indicator settings,
where we edit the "Source Plot" and "MA/Source Fills".

We can turn ON/OFF the "Source Plot" -
which plots a line of the "Source" that you have selected -
and edit the parameters :

Checking the "Source Plot" box turns the "Source Plot" ON/OFF.
You can turn Up/Down Color Change ON/OFF,
and adjust Line Thickness and Offset.

(The Plot Style, Up/Down/Solid Colors, and all Opacities of the Source Plot
are customizable under the Style tab of the indicator settings.)

Next is where you can turn ON/OFF and edit each "MA/Source Fill".

Checking the "MA#1/Source Fill" box turns on the fill between MA#1 and the source.
You can choose the color and opacity for the above-color and the below-color.
Need to switch the display of the two colors?... turn on "Color Swap" to easily do just that.

The remaining 3 MA/Source Fills work in the same exact way...
turning on a fill between the associated MA#, and the source.
In total, there are 4 MA/Source Fills... 1 for each MA.

Note that neither the Source Plot, nor any of the MA's, need to be turned on
in order to use the MA/Source Fills.

Finally, lets look at the third section of the Inputs tab of the indicator settings.

This is where we can edit the 3 "MA/MA Fills".
An MA/MA Fill allows you to select any 2 of the 4 MA's that you have set,
and fill the space between them with color :

Checking the MA/MA Fill box turns ON/OFF the associated MA/MA Fill.
Below each ON/OFF switch are 2 boxes where you can select the 2 MA's that you want to fill between.
Select the 2 MA's that you want to use according to their MA#'s.
Next, you have the Above/Below Color/Opacity for the associated MA/MA Fill,
and lastly, the Color Swap option.

The numerical order of the MA#'s that you select here is of no concern,
because each MA/MA Fill has that "Color Swap" option...
and, as before, this swaps the display of the above-color and the below-color.

Note that the MA's do not need to be turned on
in order to use the MA/MA Fills.


Additional Notes :

All colors and opacities of this indicator can be customized.

All fills can have above/below colors, and all plots can have up/down colors.
All fills and plots can be one static color, too.

All plots can be 1 of 10 plot styles:
Line, Line with Breaks, Step Line, Step Line with Diamonds, Histogram,
Cross, Area, Area with Breaks, Columns, or Circles.

All plots use the same single "Source", which is selectable.

And don't forget... you can try applying this indicator to other indicators!


Now, let's take a look at some examples of the Durbtrade Moving Averages System in action!

All 4 MA's plots on, MA Type is SMA , color-changing on, lengths 50, 100, 150, and 200 :

Add the Source Plot, and all 4 MA/Source Fills :

Add the 3 MA/MA fills :

Turn off candles visibility, and turn off MA color-change :

Turn off the MA plots :

Turn off the Source Plot :


Here are some other images using the Multi Moving Average Tool :

Here it is on the 1Second :

Here it is on the 3Day :

Here is your 1Day SMA DeathCross :

Use 3 Moving Average Systems at once to build your own EMA Ribbon :

Compare 4 different MA types, all with the same length :


Script Stats :

Pinescript Version : 5
Code Length : 149 Lines
Total Plots : 16
- Visible Plots : 5 (4 MA Plots, 1 Source Plot)
- Invisible Plots : 11 (4 MA Plots, 1 Source Plot, 6 MA/MA Fill Plots)
Total Fills : 7 (4 MA/Source Fills, 3 MA/MA Fills)
Total Colors/Opacities : 29
Total Unique Variables : 92
- Input Variables : 69
- Unique Output Variables : 23


Final Thoughts :

I'm excited to share the Durbtrade Moving Averages System!
I think that this indicator has a wide range of MA-related applications,
an easy-to-use interface with maximum customization, and unique fill features...
all in one indicator.
I feel that it is a quick and useful tool
whether you are just plotting a few moving averages...
or you are creating intense kaleidoscopic tidal waves of colored data!

Either way, I think it is pretty awesome,
and so, I wanted to share it with you...
I hope that you enjoy it and find it useful!

- Please feel free to comment your thoughts, critiques, or suggestions. They are all very helpful!
- Also, please feel free to comment any positive feedback, or awesome screencaps/ideas of the indicator in action!
- Check out my other Pinescript indicators if you like this one... they work well together.
- I hope that you find this script useful.
- Enjoy!


// Durbtrade