Moving Averages For All TimeframesManage moving averages, for every timeframe, from within one indicator.
Features:
■ Intraday - Up to 3 moving averages
■ Daily - Up to 4 moving averages
■ Weekly - Up to 2 moving averages
■ Monthly - Up to 2 moving averages
■ Choose between simple, exponential or volume weighted moving averages (SMA, EMA or VWMA)
Экспоненциальное скользящее среднее (EMA)
TV Community AlgoTV Community Algo is a free TradingView script that I designed from the ground to benefit the traders of this community. It has plenty of features that you will enjoy, and I have included documentation for how to use this below!
Settings:
Basic:
Turn the Void Lines on or off
Turn the Dashboard on or off
Turn the Signal Bars on or off
Turn the Support & Resistance Lines on or off
Turn the EMA 8 and EMA 200 on or off
Turn the Buy & Sell Signals on or off
Turn the Fibonacci Retracement Tool on or off
Style:
Change the Dashboard's distance from the price action
Change the Dashboard's Color and Transparency
Change the Dashboard Text Color
Change the Fibonacci Deviation
Make the Fibonacci Retracement Tool reverse
Make the Fibonacci Lines extend left, right, both directions, or none
Turn Fibonacci Prices on or off
Turn Fibonacci Levels on or off and change between percent or value
Change Fibonacci Label Position from the left or the right
Usage:
This algo has many uses including but not limited to:
Finding entries and exits using the EMA 8 and EMA 200 crossovers
Using the Void Lines to identify bounces or reversals
Using the Signal Bars to identify trend and confirmation for entries and exits
Using the Dashboard information for confirmation and informational purposes
In the images below, I give a few examples of the many uses of the TV Community Algo!
VOID LINES
The Void Lines are very helpful when it comes to identifying reversals.
TV COMMUNITY ALGO DASHBOARD
The Dashboard is filled with useful information that all traders can benefit from!
SIGNAL BARS
The colored candles known as Signal Bars inform you of when the price action is above or below the midpoint of the Void Lines.
AUTO SUPPORT & RESISTANCE LINES
These lines help traders find accurate levels of support & resistance on all time frames, and the lines change color depending on if the price is above or below them.
EMA 8 AND 200
The EMA 8 and EMA 200 crossovers can be used as entry and exit signals.
BUY & SELL SIGNALS
The BUY & SELL signals can be used to find optimal entries and exits for trades on any time frame. Smaller time frames are best for scalping, while larger time frames are more suited for longer trades. When combined with the EMA lines and Dashboard information, these signals can produce incredibly profitable trades.
AUTO FIBONACCI RETRACEMENT TOOL
The Auto Fibonacci Retracement Tool allows you to plot perfect Fib Lines every time.
Conclusion:
I truly hope that the TV Community Algo benefits the TradingView community and that you all find some value in it. I worked very hard on this product and I would love to see it put to good use.
with love,
-Lemon 🍋
This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
MACD oscillator with EMA alert version 4HThis is the study/indicator alert version of the macd + ema strategy.
The strategy details are the following :
Is a simple, yet efficient strategy, which is made from a combination of an oscillator and a moving average.
Its setup for 4h candles with the current settings, however it can be adapted to other different timeframes.
It works nicely ,beating the buy and hold for both BTC and ETH over the last 3 years.
As well with some optimizations and modifications it can be adapted to futures market, indexes(NASDAQ, NIFTY etc), forex( GBPUSD ), stocks and so on.
Components:
MACD
EMA
Time condition
Long/short option
For long/exit short we enter when we are above the ema , histogram is positive and current candle is higher than previous.
For short /exit long , when close below ema , histo negative and current candles smaller than previous
If you have any questions please let me know !
MACD oscillator with EMA strategy 4H This is a simple, yet efficient strategy, which is made from a combination of an oscillator and a moving average.
Its setup for 4h candles with the current settings, however it can be adapted to other different timeframes.
It works nicely ,beating the buy and hold for both BTC and ETH over the last 3 years.
As well with some optimizations and modifications it can be adapted to futures market, indexes(NASDAQ,NIFTY etc), forex(GBPUSD), stocks and so on.
Components:
MACD
EMA
Time condition
Long/short option
For long/exit short we enter when we are above the ema, histogram is positive and current candle is higher than previous.
For short /exit long , when close below ema, histo negative and current candles smaller than previous
If you have any questions please let me know !
RSKYVNThis indicator is a combination of ema and sma which is good for trend analysis.
I put buy and sell signal in this indicator for an easy entry and exit.
How to use it?
First check our ma100. Ma100 shows trend analysis whether we are (uptrend and downtrend).
Second just wait for our biuy and sell signal.
This is profitable when ma100 is under our sma and ema region. So always wait that ma100 dive under ema and ma regions to enter a trade.
Disclaimer: This indicator is only good when there is a trend. The only flaw of this is when market is consolidating if that the case just switch to a support and resistance or fibonacci for entry and exit.
Always remember manage your own risk
Multi Time Frame EMA Signal & ResistanceFull code and description: github.com/samgozman/MTF-EMA-Signal-and-Resistance
The idea of this script is quite simple. Imagine that you have a 200-day EMA and its support or resistance line is the 200-week EMA.
Then if EMA 200 1D > EMA 200 1W then the trend is bullish.
That is, EMA 200 1D is the signal line, and EMA 200 1W is the resistance.
Of course, you can independently set the time interval for the signal line and resistance, as well as the number of periods.
In addition to setting time intervals and period lengths, you can optionally enable the display of additional class EMAs.
You can also set the timeframe for the signal line equal to the current time period.
[RickAtw] T2 Trend Signal GOLDTrend gold signal Ema strategy
The system finds the best entries for a trade. Use in gold, all numbers have been customized for it.
Functional
T2 trend gold is the second version of my trading system. Be sure to check out the first part! This system gives a signal earlier.
Key signals
Buy -----> Blue triangle to buy
Sell -----> Red triangle to sell
Remarks
I personally tested this system on my own trading and it helps me find entries for deals. The main thing is, if consolidation has begun, turn off the system, because the trading range is small at this moment, use oscillators
Thanks to everyone who supports me. Good luck to you friends
Multi_TF_EMAMultiple TimeFrame EMA
In a single indicator, up to 6 EMAs can be displayed in 6 different time frames.
En un solo indicador se puede visualizar hasta 6 EMAs en diferentes TImeFrames.
EMA RainbowBased on Ripsters EMA clouds, this :
adds an 6 section EMA rainbow to act as DYNAMIC support and resistance levels, that you never have to set manually
splits the 5-12 cloud into 2 parts, as opposed to using a 8-9 centerline. More visually pleasing and intuitive to use
When 300 cloud and 25 cloud are both bullish or bearish - look to take positions in that direction
Use 5 cloud to find pullbacks for entry points
When cloud is moving away (diverging) from other clouds - momentum is increasing
When cloud is increasing in diameter (expanding) - momentum is increasing
When cloud is moving towards other clouds (converging) - momentum is increasing
When cloud is decreasing in diameter (contracting) - momentum is increasing
Example - MA-Cross Retracement DetectionThe retracement tracker function(s) in this script outline how to:
Track conditions using "toggle" booleans.
Use multiple coinciding conditions to trigger an event just once.
What is a retracement?
"Retracements are temporary price reversals that take place within a
larger trend. The key here is that these price reversals are temporary
and do not indicate a change in the larger trend."
Quote Source: www.investopedia.com
CT Moving Average Crossover IndicatorMoving Average Crossover Indicator
Here I present a moving average indicator with 9 user definable moving averages from which up to 5 pairs can be selected to show what prices would need to be closed at on the current bar to cross each individual pair.
I have put much emphasis here on simplicity of setting the parameters of the moving averages, selecting the crossover pairs and on the clarity of the displayed information in the optional “Moving Average Crossover Level” Information Box.
What Is a Moving Average (MA)?
According to Investopedia - “In statistics, a moving average is a calculation used to analyze data points by creating a series of averages of different subsets of the full data set.
In finance, a moving average (MA) is a stock indicator that is commonly used in technical analysis. The reason for calculating the moving average of a stock is to help smooth out the price data by creating a constantly updated average price.
By calculating the moving average, the impacts of random, short-term fluctuations on the price of a stock over a specified time-frame are mitigated.”
The user can set the color, type (SMA/EMA) and length of each of the 9 moving averages.
Then the user may choose 5 pairs of moving averages from the set of 9.
The script will then calculate the price needed to be crossed by the close of the current bar in order to crossover each of the user defined pairs and outputs the results as optional lineplots and/or an Infobox which shows the relevant information in a very clear way.
The user may switch the moving averages, crossover lineplots and infobox on and off easily with one click boxes in the settings menu.
The number of decimal places shown in the Infobox can be altered in the settings menu.
If the price required to cross a pair of moving averages is zero or less, the crossover level will display “Impossible” and the plots will plot at zero. (this helps ameliorate chart auto-focus issues)
Quoting a variety of online resources …….
Understanding Moving Averages (MA)
Moving averages are a simple, technical analysis tool. Moving averages are usually calculated to identify the trend direction of a stock or to determine its support and resistance levels. It is a trend-following—or lagging—indicator because it is based on past prices.
The longer the time period for the moving average, the greater the lag. So, a 200-day moving average will have a much greater degree of lag than a 20-day MA because it contains prices for the past 200 days. The 50-day and 200-day moving average figures for stocks are widely followed by investors and traders and are considered to be important trading signals.
Moving averages are a totally customizable indicator, which means that an investor can freely choose whatever time frame they want when calculating an average. The most common time periods used in moving averages are 15, 20, 30, 50, 100, and 200 days. The shorter the time span used to create the average, the more sensitive it will be to price changes. The longer the time span, the less sensitive the average will be.
Investors may choose different time periods of varying lengths to calculate moving averages based on their trading objectives. Shorter moving averages are typically used for short-term trading, while longer-term moving averages are more suited for long-term investors.
There is no correct time frame to use when setting up your moving averages. The best way to figure out which one works best for you is to experiment with a number of different time periods until you find one that fits your strategy.
Predicting trends in the stock market is no simple process. While it is impossible to predict the future movement of a specific stock, using technical analysis and research can help you make better predictions.
A rising moving average indicates that the security is in an uptrend, while a declining moving average indicates that it is in a downtrend. Similarly, upward momentum is confirmed with a bullish crossover, which occurs when a short-term moving average crosses above a longer-term moving average. Conversely, downward momentum is confirmed with a bearish crossover, which occurs when a short-term moving average crosses below a longer-term moving average.
Types of Moving Averages
Simple Moving Average (SMA)
The simplest form of a moving average, known as a simple moving average (SMA), is calculated by taking the arithmetic mean of a given set of values. In other words, a set of numbers–or prices in the case of financial instruments–are added together and then divided by the number of prices in the set.
Exponential Moving Average (EMA)
The exponential moving average is a type of moving average that gives more weight to recent prices in an attempt to make it more responsive to new information.
To calculate an EMA, you must first compute the simple moving average (SMA) over a particular time period. Next, you must calculate the multiplier for weighting the EMA (referred to as the "smoothing factor"), which typically follows the formula: 2/(selected time period + 1). So, for a 20-day moving average, the multiplier would be 2/(20+1)= 0.0952. Then you use the smoothing factor combined with the previous EMA to arrive at the current value.
The EMA thus gives a higher weighting to recent prices, while the SMA assigns equal weighting to all values.
Bollinger Bands Trending Reverse StrategyWelcome to yet another script. This script was a lot easier since I was stuck for so long on the Donchian Channels one and learned so much from that one that I could use in this one.
This code should be a lot cleaner compared to the Donchian Channels, but we'll leave that up to the pro's.
This strategy has two entry signals, long = when price hits lower band, while above EMA, previous candle was bearish and current candle is bullish.
Short = when price hits upper band, while below EMA, previous candle was bullish and current candle is bearish.
Take profits are the opposite side's band(lower band for long signals, upper band for short signals). This means our take profit price will change per bar.
Our stop loss doesn't change, it's the difference between entry price and the take profit target divided by the input risk reward.
Stacked Moving AveragesThe Stacked Moving Averages indicator lets you see if a ticker is in an uptrend, downtrend, or no trend based on the condition of the moving averages. If the moving averages are stacked such that MA1>MA2>MA3>MA4>MA5, then that is described as an uptrend. If the moving averages are stacked such that MA5>MA4>MA3>MA2>MA1, then that is defined as a downtrend.
The moving averages can be SMA, EMA, or DEMA, and it’s possible to view all the moving average series in the chart or hide all series and only see if there is an uptrend or downtrend according to the condition.
Note: If length 4 OR length 5 is zero the MA4 OR MA5 will be ignored.
Background Color Based on EMAHello Traders,
this is a very simple script. It paints the background color based on the close price in reference to an exponential moving average.
If the close is above the EMA the background color will be green.
If the close is under the EMA the background color will be red.
You can adjust colors and the EMA period by yourself.
This little indicator script is just to get a better overview, for example in combination with other indicators.
Hope you guys like this script. Wish you a great trading week.
MACD + PSAR SetupThis indicator combines 3 elements:-
1. MACD which will act as a source of potential Buy Signal
2. PSAR which provides the confirmation for buy signal and for potential Buy on Dip Strategy
3. Breakout candles which provides the confirmation signal for Buy on Breakout strategy
4. The direction of the trend is provided by the Exponential Moving Average
The strategy is to have any counters which has triggered the MACD Golden Cross signal. These counters are to be out under watchlist for further confirmation.
The Buy Signal is confirmed when:-
1. Price is above EMA Direction(standard is set at 200)
2. PSAR has given the Buy Signal OR a Breakout Candle occurs.
Buy Signal is shown with a Green Diamond symbol whilst the Sell Signal is shown in Red Diamond Symbol.
The bullish and bearish condition is set via a green and red background
The MACD and PSAR codes are derived from the standard codes which is available in tradingview.
Reivaj MA - PreSession This script contains 9 moving averages which can be changed each between "sma", "ema", "wma", "vwma.
The values of the moving averages are:
MMA20 = SMA20
MMA50 = SMA50
MMA100 = SMA100
MMA200 = SMA200
MMA300 = SMA300.
MMAextra1 = ema 8
MMAextra2 = ema21
MMAextra3 = sma400
MMAextra4 = sma500.
It has an Asian range that goes from 21: 00-07: 00 UTC which turns the color of the candle in green.
And pre-sessions that is one hour before the opening, the time of the opening and the hour after the opening of London and New York.
Donchian Channels Trending Breakout StrategyThis script looks for two entry signals. Long is when the previous breakout of the donchian channels was a low, price is above the input EMA, current price is equal or higher than the upper band and we're not in a position yet. Short is the other way around, so previous breakout of the donchian channels was a high, price is below the input EMA, current price is equal or lower than the lower band.
I haven't found a script that does take the previous highs and lows into consideration. Works for any markets in any conditions because the stop loss and profit targets are based on the upper and lower band of the donchian channels, which means the stop loss and profit targets move with the trend.
For more details see the script itself, I wrote a ton of comments.
Color Changing Moving Average
Hello everybody!
I'm not much of a coder but I do make indicators for myself for fun sometimes and found this one super cool. Hope it helps!
Basically it's a moving average that changes colors based on the trend. How does it do it, you may ask? Simply put, it checks and makes sure that the open and close price is above the moving average, then it checks and sees if the 50-period RSI (length adjustable) is above 50. If both conditions are met, the moving average turns green. Simple as that.
If the price is below the moving average and the RSI is below 50, the moving average turns red.
If the price is above the moving average but the RSI is below 50, the line is grey and I advise to simply waiting for the trend direction to be decided. Likewise, if the price is below the moving average, but the RSI is above 50, the line is also grey.
This is NOT a comprehensive system, and the changing color of the moving average does not indicate a buy or sell signal. It simply indicates that the price is trending. You should use your own entry and exit strategy, such as the MACD, Wave Trend, Schaff Trend Cycle, etc.
As well, I would recommend waiting for confirmation of a trend change when the color changes, since in a range price can cross multiple times before deciding on the right direction.
The slope of the moving average can help too, since in a range the moving average is typically flat.
I would recommend using a fixed risk to reward ratio, to limit emotions. But, this would also help with a trend-following strategy due to the trend filter functionality.
The length of the moving average is adjustable, as well as the RSI period- though I wouldn't recommend selecting an RSI lower than 30 because it will whipsaw more. Disabling the EMA option will give you an SMA that does the same thing as the EMA. You can also disable the RSI filter and simply have a moving average that changes color when the price is above/below- but that's pretty boring, huh?
Anyways, hope this helps, happy trading everybody :)
Performante's Average Bitcoin Volume EMA Indicator This is the average Bitcoin volume with the data collected from the major retail exchanges + the exponential moving average (EMA) for the volume added on to better understand relative volume.
Thank you Julio!
EMA Ribbon - low clutter, configurable [aspiers]This script improves on many of the existing EMA ribbon scripts out there:
Reduces visual clutter with shorter labels / titles, and thinner, transparent lines which don't obscure the actual price chart
Two beautiful color gradients for up and down trends
All colors and EMA periods are fully configurable, using the new input grouping / inline features
Uses Pine Script v4, which makes it more future-proof and allows new functionality, e.g.
It allow configurable period resolution, e.g. so user can fix at day resolution even when chart is being viewed at hour or minute resolution (this is the default)
Code clean-up: remove redundant ternary conditionals, improve variable names
Allow smoothing threshold for changes in trend direction to be configurable
MACD Crossover trend strategy, Long and ShortHey everybody,
This is my first strategy and script I wrote mostly myself. There's tons of content out there to learn how to code in Pinescript and it's exactly what I wanted and needed in this time of my life.
In any case, I made a rather simple MACD crossover strategy that only takes trades in the direction of both EMA and SMA (there are inputs to change the length of the moving averages and lots of other stuff too).
If the MACD line crosses upwards on the signal line, while above the zero point of the histogram and the price is above EMA + SMA , it's a long signal.
If the MACD line cosses downards on the signal line, while below zero on the histogram and the price is below EMA + SMA , it's a short signal.
There are a lot of default variables that make no sense, for basically any symbol you're going to be looking at. You're going to have to adjust the EMA , SMA , backtest date, take profit, stop loss and all that good stuff yourself to find decently profitable parameters.
I made this myself because I couldn't really find a strategy out there that allowed for so much customizing and it's an easy way to get started in Pinescript.
If you have any suggestions, tips or you see a flatout mistake in my code, please let me know. I'm still learning, everyday and I'm enjoying every second of it.
EMA with RSI Backed Divergence BandsEMA200 with bands around it showing the effect of changes in RSI scaled by ATR . When the filling is green it indicates the bullish momentum and bearish when it is red.