Daily Moving Averages on Intraday ChartsThis moving average script displays the chosen 5 daily moving averages on intraday (minute) charts. It automatically adjusts the intervals to show the proper moving averages.
In a day there are 375 trading minutes from 9:15 AM to 3:30PM in Indian market. In 5 days there are 1875 minutes. For other markets adjust this data accordingly.
If 5DMA is chosen on a five minute chart the moving average will use 375 interval values (1875/5 = 375) of 5minute chart to calculate moving average. Same 5DMA on 25minute chart will use 75 interval values (1875/25 = 75).
On a 1minute chart the 5DMA plot will use 1875 interval values to arrive at the moving average.
Since tradingview only allows 5000 intervals to lookback, if a particular daily moving average on intraday chart needs more than 5000 candle data it won't be shown. E.g 200DMA on 5minute chart needs 15000 candles data to plot a correct 200DMA line. Anything less than that would give incorrect moving average and hence it won't be shown on the chart.
MA crossover for the first two MAs is provided. If you want to use that option, make sure you give the moving averages in the correct order.
You can enhance this script and use it in any way you please as long as you make it opensource on TradingView. Feedback and improvement suggestions are welcome.
Special thanks to @JohnMuchow for his moving averages script for all timeframes.
Multiplemovingaverage
@tk · fractal emas█ OVERVIEW
This script is an indicator that plots short, medium and long moving averages for multiple fractals. This script was based on sharks EMAs by rlvs indicator, that plots multiple rays for each fractals into the chart. The main feature of this indicator is the customizability. The calculation itself is simple as moving average.
█ MOTIVATION
The trader can customize all aspects of the plotted data. The text size, extended line length, the moving average type — exponential, simple, etc... — the length of fractal rays, line style, line width and visibility. To keep minimalist, this indicator simplifies the logic of line colors based on the purpose of each moving averages. To prevent overnoise the chart with multiple lines with multiple colors for each fractal timefraes, the trader needs to keep in mind that the all lines with the "short" moving average color for example, will represents the short moving averages lines for all fractals. This logic is applied for medium and long moving averages either.
█ CONCEPT
The trading concept to use this indicator is to make entries on uptrend or downtrend pullbacks when the asset price reaches the short, medium or long moving averages price levels. But this strategy don't works alone. It needs to be aligned together with others indicators like RSI, Chart Patterns, Support and Resistance, and so on... Even more confluences that you have, bigger are your chances to increase the probability for a successful trade. So, don't use this indicator alone. Compose a trading strategy and use it to improve your analysis.
█ CUSTOMIZATION
This indicator allows the trader to customize the following settings:
GENERAL
Text size
Changes the font size of the labels to improve accessibility.
Type: string
Options: `tiny`, `small`, `normal`, `large`.
Default: `small`
SHORT
Type
Select the Short Moving Average calculation type.
Type: string
Options: `EMA`, `SMA`, `HMA`, `VWMA`, `WMA`.
Default: `EMA`
Length
Changes the base length for the Short Moving Average calculation.
Type: int
Default: 12
Source
Changes the base source for the Short Moving Average calculation.
Type: float
Default: close
Color
The base color that will represent the Short Moving Average.
Type: color
Default: color.rgb(255, 235, 59) (yellow)
Fractal Style
The fractal ray line style.
Type: string
Options: `dotted`, `dashed`, `solid`.
Default: `dotted`
Fractal Width
The fractal ray line width.
Type: string
Options: `1px`, `2px`, `3px`, `4px`.
Default: `1px`
Fractal Ray Length
The fractal ray line length.
Type: int
Default: 12
MEDIUM
Type
Select the Medium Moving Average calculation type.
Type: string
Options: `EMA`, `SMA`, `HMA`, `VWMA`, `WMA`.
Default: `EMA`
Length
Changes the base length for the Medium Moving Average calculation.
Type: int
Default: 26
Source
Changes the base source for the Medium Moving Average calculation.
Type: float
Default: close
Color
The base color that will represent the Short Moving Average.
Type: color
Default: color.rgb(0, 230, 118) (lime)
Fractal Style
The fractal ray line style.
Type: string
Options: `dotted`, `dashed`, `solid`.
Default: `dotted`
Fractal Width
The fractal ray line width.
Type: string
Options: `1px`, `2px`, `3px`, `4px`.
Default: `1px`
Fractal Ray Length
The fractal ray line length.
Type: int
Default: 12
LONG
Type
Select the Long Moving Average calculation type.
Type: string
Options: `EMA`, `SMA`, `HMA`, `VWMA`, `WMA`.
Default: `EMA`
Length
Changes the base length for the Long Moving Average calculation.
Type: int
Default: 200
Source
Changes the base source for the Long Moving Average calculation.
Type: float
Default: close
Color
The base color that will represent the Short Moving Average.
Type: color
Default: color.rgb(255, 82, 82) (red)
Fractal Style
The fractal ray line style.
Type: string
Options: `dotted`, `dashed`, `solid`.
Default: `dotted`
Fractal Width
The fractal ray line width.
Type: string
Options: `1px`, `2px`, `3px`, `4px`.
Default: `1px`
Fractal Ray Length
The fractal ray line length.
Type: int
Default: 12
VISIBILITY
Show Fractal Rays · (Short)
Shows short moving average fractal rays.
Type: bool
Default: true
Show Fractal Rays · (Medium)
Shows short moving average fractal rays.
Type: bool
Default: true
Show Fractal Rays · (Long)
Shows short moving average fractal rays.
Type: bool
Default: true
█ FUNCTIONS
The script contains the following functions:
`fn_labelizeTimeFrame`
Labelize timeframe period in minutes and hours.
Parameters:
tf: (string) Timeframe period to be labelized.
Returns: (string) Labelized timeframe string.
`fn_builtInLineStyle`
Converts simple string to built-in line style variable value.
Parameters:
lineStyle: (string) The line style simple string.
Returns: (string) Built-in line style string value.
`fn_builtInLineWidth`
Converts simple pixel string to line width number value.
Parameters:
lineWidth: (string) The line width pixel simple string.
Returns: (string) Built-in line width number value.
`fn_requestFractal`
Requests fractal data based on `period` given an expression.
Parameters:
period: (string) The period timeframe of fractal.
expression: (series float) The expression to retrieve data from fractal.
Returns: (mixed) A result determined by `expression`.
`fn_plotRay`
Plots line after chart bars.
Parameters:
y: (float) Y axis line position.
label: (string) Label to be ploted after line.
color: (color) Line and label color.
length: (int) Line length.
show: (bool) Flag to display the line. (default: `true`)
lineStyle: (string) Line style to be applied. (default: `line.style_dotted`)
lineWidth: (int) Line width. (default: `1`)
Returns: void
`fn_plotEmaRay`
Plots moving average line for a specific period.
Parameters:
period: (simple string) Period of fractal to retrieve
expression: (series float) The expression to retrieve data from fractal.
color: (color) Line and label color.
length: (int) Line length. (default: `12`)
show: (bool) Flag to display the line. (default: `true`)
lineStyle: (string) Line style to be applied. (default: `line.style_dotted`)
lineWidth: (string) Line width. (default: `1px`)
Returns: void
`fn_plotExtendedEmaRay`
Draws extended line for current timeframe moving average.
Parameters:
coordY: (float) Extended line Y axis position.
textValue: (simple string) Extended line label text.
textColor: (color) Extended line text color.
length: (int) Extended length. (default: `5`)
Returns: void
+ Multi-timeframe Multiple Moving Average LinesThis is a pretty simple script that plots lines for various moving averages (what I think are the most commonly used across all markets) of varying lengths of timeframes of the user's choosing. Timeframes range from 5 minutes up to one month, so regardless if you're a scalper or a swing trader there should be something here for you.
There are 8 lines (that can be turned on/off individually), which may seem like a lot, but if you use two averages and want to display four different timeframes for each, you can do that. The nice thing is that because the lines start plotting from the current bar they won't clutter up the screen. And obviously having moving averages from different timeframes on your chart makes price action more difficult to read (I mean sure, you can make them invisible, but who wants to do that all the time).
For each line there are two labels. One with the moving average type, and the other with its specific timeframe. I can't include the moving average length because it's not a string input. If anyone has a workaround for this, let me know, otherwise I would simply recommend setting different colors depending on the length, or if you only use one or two lengths and one or two moving averages this shouldn't be an issue. I had to use two labels because for the label text I couldn't include more than one string input, this is why there is an input for the 'moving average type label distance.'' You will want to adjust this depending on if you are trading crypto, futures, or forex because in some cases there may still be label overlap.
Pretty much everything else is self-explanatory.
I've added alerts. I might need to modify them if I can, because it would be nice for them to state the name and timeframe of the moving average. But I think this will do for now.
Enjoy!
Moving Average Multitool CrossoverAs per request, this is a moving average crossover version of my original moving average multitool script .
It allows you to easily access and switch between different types of moving averages, without having to continuously add and remove different moving averages from your chart. This should make backtesting moving average crossovers much, much more easier. It also has the option to show buy and sell signals for the crossovers of the chosen moving averages.
It contains the following moving averages:
Exponential Moving Average (EMA)
Simple Moving Average (SMA)
Weighted Moving Average (WMA)
Double Exponential Moving Average (DEMA)
Triple Exponential Moving Average (TEMA)
Triangular Moving Average (TMA)
Volume-Weighted Moving Average (VWMA)
Smoothed Moving Average (SMMA)
Hull Moving Average (HMA)
Least Squares Moving Average (LSMA)
Kijun-Sen line from the Ichimoku Kinko-Hyo system (Kijun)
McGinley Dynamic (MD)
Rolling Moving Average (RMA)
Jurik Moving Average (JMA)
Arnaud Legoux Moving Average (ALMA)
Vector Autoregression Moving Average (VAR)
Welles Wilder Moving Average (WWMA)
Sine Weighted Moving Average (SWMA)
Leo Moving Average (LMA)
Variable Index Dynamic Average (VIDYA)
Fractal Adaptive Moving Average (FRAMA)
Variable Moving Average (VAR)
Geometric Mean Moving Average (GMMA)
Corrective Moving Average (CMA)
Moving Median (MM)
Quick Moving Average (QMA)
Kaufman's Adaptive Moving Average (KAMA)
Volatility-Adjusted Moving Average (VAMA)
Modular Filter (MF)
Moving Average MultitoolI made this script as a personal tool while backtesting multiple moving averages. It allows you to easily access and switch between different types of moving averages, without having to continuously add and remove different moving averages from your chart.
It also has the option to show the a 14 period average distance between the closing price of an asset and the selected moving average, as a multiple of ATR. This number can be shown by enabling the "Show ATR Between MA and Close" setting. The intention of this value is to quantify and compare the speed of different moving averages across any instrument and any timeframe. The higher the value, the slower the moving average. The lower the value, the faster the moving average.
Hx 9 Moving AveragesThis script is designed to handle and provide quick and easy access to up to 9 different moving averages in one indicator and one tab.
Basically, it leverages the 'inline' and 'group' arguments of the 'input' function to provide you with a simple and straightforward way to:
- define your favorite moving averages by choosing type, length, source and color in the same tab and
- decide which moving averages to display in one click on a checkbox.
I do not like to have to select the color of an indicator in another tab. So, I put everything in the Inputs tab.
In addition, I like to "linewidth code" my moving averages so that a sma has a different thickness than an ema for example.
To do so, just define the line width that you want to associate with a moving average type in the "LINE WIDTH" section.
Once parameters are set to your liking, just check / uncheck the moving averages you want to display / hide (and save your settings as default).
This script handles 9 different moving averages and implements sma, wma, ema, vwma, rma (RSI) and hma (Hull).
It can easily be modified to change the number of available moving averages or include other types of moving averages.
The default settings provide an example of commonly used moving averages with associated colors ranked from Hot (more nervous) to Cold (less nervous) with the exception of Hull moving average displayed in gray.
These settings are just an example and are NOT meant to be used as a trading system! DYOR!
Hope it will be useful.
Enjoy and please let me know what you think in the comments.
+ Rate of Change (and OBV)The Rate of Change, or RoC, is a momentum indicator that measures the percentage change in price between the current period and the price n periods ago. It oscillates above and below a zeroline, basically showing positive or negative momentum. I applied the OBV's calculation to it, but without the inclusion of volume (also added a lookback period) to see what would happen.
Actually what happened was I was looking at hot-rodding the OBV indicator, but then wondered if I could apply the cumulative calculation to another indicator to see what would happen. Not sure why I chose the Rate of Change, but it seemed a neat idea. And it worked! And so I called it the "Cumulative Rate of Change." I only recently realized that this is actually just the OBV without volume, HOWEVER the OBV does not have a lookback period, and its source is the close of each period. Basically, when you look at the calculation for the OBV you'll notice that it's a cumulative measure of the "change" of the closing price against the previous close times the volume. The Rate of Change is basically that measurement over more than one period, excluding the volume, and is not cumulative. Thus the "Cumulative Rate of Change" is basically an OBV without the volume but with the capability to adjust the lookback period.
Anyway, after days and weeks of playing with the indicator pretty infrequently I did decide that I actually really liked it, especially with the addition of moving averages and bollinger bands. So I decided to play with it a bit more.
I added a drop-down menu to include the standard Rate of Change indicator, and then thought I may as well add the OBV too, in case someone might like to compare that to the C-RoC, or just wants an OBV with myriad moving averages and bollinger bands.
By default I have the indicator set to the "C-RoC" and the lookback is set to 1, but play with longer settings (this is pretty much necessary if using the traditional RoC, which is by default set to 10 in TradingView, and is nigh on useless at 1).
I also recommend playing with the source. 'Close' is nice, but 'ohlc4' provides some very nice signals as well, as it follows the price flow for each period completely, filtering the noisiness of 'close' as source.
Hope you guys like this. With the bollinger bands and your preferred moving average settings this can be a powerful tool for re-entering trades in trend, taking profits, determining momentum swings.
3GBH - Simple HMA'sIncluded in this indicator:
- 3x HMA w/ cloud
(Slow/Fast HMA)
(Signal HMA)
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - CCI + HMAsCommodity Channel Index w/ Hull Moving Average's.
Included in this indicator:
- CCI
- 3x HMA's that use the CCI as the source.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - Multiple HMAIncluded in this indicator:
- 3 Hull Moving Averages
- High & Low background fill
-----
You can toggle On/Off, any or all of the HMA's.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - Multiple MA'sIncluded in this indicator:
- Fast/Slow EMA's
- Fast/Slow SMA's
- Fast/Slow WMA's
- Fast/Slow HMA's
- Fast/Slow RMA's
-----
Use of of the type of Moving Averages.
Or use them all.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
Equally Spaced MAThis indicator considers multiple moving averages as band rather than lines.
The band repeats divergence, convergence and reversal.
An evenly spaced moving average is a good way to capture this movement.
Set the interval instead of setting the period individually.
You can also choose the type of moving average.
- SMA
- WMA
- EMA
- HMA
Multiple Moving Averages in one indicatorHi, that's an "enhanced" version of this indicator gently published by myfye13 .
Here's the things I've implemented:
Up to 8 moving averages
Now you can set the source of each moving average
Now you can set the length of each moving average.
Hope this will help especially those who have an indicato limit or who use multiple emas and don't wan't to see a stack of indicators list on the upper left of the chart.
Multiple Ma with Bollinger band and MacDIt is a simple inclusion of the basic 3 types of indicators most commonly used.
*4 x Multiple Moving averages
*Bollinger Band
*MacD indicator.
The indicator lines are set up to display names to avoid any confusion.
This will free up space to better understand and learn how these indicators interact with price action.
Please note: this indicator makes use of standard indicator calculations and scripts and have no additional edge on the current built in ones, that is freely available within the Trading view platform
EMA 20/100/200 alwaysThis script will always show the EMA 20/100/200 daily values across any time frame chart (e.g. showing daily 20 EMA while viewing the 5 minute chart)
Multiple Moving Averages {Cybernetwork}Multiple moving average (MA) plots in a single script.
Can select between different MA types, and enable/disable a particular MA in the settings.
Enjoy. :)
EMA/SMA Combos-DayCoderCombination of standard EMAs and SMAs for users who do not have a pro tradingView
Volume moving indicatorHi guys,
This is a multiple Volume MA script. Editing is free for use.
You can use several ma lines by adding one indicator only, and I put 10,20,30,60,100,200 as a threshold which I frequently use.
It is made as an open source at any time possible, so that you are free for playing with it. Even you can add more if you are keen to do so.
Cheers,
JB
rainbow emaHi guys,
This is a multiple EMA script. Editing is free for use if you swap ema to sma as a base setting.
You can use several ema lines by adding one indicator only, and I put 7,14,21,28,40,60,120,200,300 as a threshold which I frequently use.
It is made as an open source at any time possible, so that you are free for playing with it.
Cheers,
JB
Volume moving indicatorJB가 만든 거래량 이평선 모음입니다.
하나의 지표 추가 만으로 여러개의 거래량 이평선들을 사용하실 수 있고, 제가 자주 사용하는 10,20,30,60,100,200선 넣어 놨습니다.
에디트 언제든 가능하시게 오픈소스로 구성되어있으니 매매에 도움되시길 바랍니다.
rainbow ema갤럭시님 이평선 토대로 JB가 에디트한 지수이평선 모음입니다. 편집하시면 일반 이평선으로도 사용이 가능합니다.
하나의 지표 추가 만으로 여러개의 지수이평선을 사용하실 수 있고, 제가 자주 사용하는 7,14,21,28,40,60,120,200,300선 넣어 놨습니다.
에디트 언제든 가능하시게 오픈소스로 구성되어있으니, 즐겨찾기 넣어 두시고 매매하실때 유용하게 사용하시면 됩니다.
Multi Timeframe Moving Average Collection | Swing [aamonkey]This is a Multi Timeframe Moving Average Collection (Swing Edition).
Why use it?
- Spot cluster of MAs on one chart
- See support and resistance
- Spot "freefall zones"
In the default settings you will get:
20, 100 and 200 MA of the 1D, W, and the W chart.
The color indicates significance!
From weaker to stronger support/resistance:
green(1D),yellow(W),red(M)
- Length of the MAs is modifiable
- Timeframes of the MAs is modifiable
- Which MAs you want to see
- Colors
Why use this if there is a Swing edition, that can do the same?
You can use this Swing Edition if you don't want to change between the Swing and Scalp timeframes in the settings.
Just turn on of the two on or off.
Multi Timeframe Moving Average Collection | Scalp [aamonkey]This is a Multi Timeframe Moving Average Collection (Scalp Edition).
Why use it?
- Spot cluster of MAs on one chart
- See support and resistance
- Spot "freefall zones"
In the default settings you will get:
20, 100 and 200 MA of the 15min, 1h, 4h, and the 1D chart.
The color indicates significance!
From weaker to stronger support/resistance:
white(15min), green(1h),yellow(4h),red(1D)
- Length of the MAs is modifiable
- Timeframes of the MAs is modifiable
- Which MAs you want to see
- Colors