MA Cross - Multi-Timeframe The MA cross is probably one of my favourite strategies because of its simplicity but it often gets overlooked for more complex strategies.
The original author of this script is ChartArt, I have just added some extra controls and functions which are outlined below. I would just like to add that this is my first published script, everything I have learned about coding has been from studying and tinkering with many of the publicly available scripts on TV so I would like thank all the authors who give out this knowledge so freely!
Updates
- Converted to v4
- Made some graphical changes and provided more control over plots
- Added RMA and VWMA
- Added alerts
Original script can be found here
Sma
Golden Triangle StrategyGolden Triangle strategy setup is a variation of the buy-the-dip strategy, by Charlotte Hudgin.
You can find the detailed explanation here by Thomas N. Bulkowski thepatternsite.com
BUY
===
1. price should be trading above sma50
2. when it touches sma50 first time , check the starting rallypoint of where it initiated
3. from the above point to current close , see if you have white space , then draw the triangle
4. then check for volume confirmation ( current volume should be greater than last 4 ) --- I have slightly changed this to fit into hourly strategy by adding condition close>vwap
EXIT
====
1. Exit when close crossing down sma50 with at least 2% profit (slightly modified original condition)
StopLoss
========
2. stop loss is set to 6%
Warning
=======
For the use of educational purposes only
Every single moving average (ALMA, EMA, HMA, KAMA, RMA, SMA...)So you may be looking at the graph and thinking "this is a mess", and I agree.
The purpose of this script is to plot in the same graph every single type of moving average that I could think of, so you can find the ones that are better for your timeframe and for your asset. Once you add it, disable those types that doesn't seem to serve your purpose, until you can select one you like.
The average types are: ALMA, EMA, HMA, KAMA, RMA, SMA, SWMA, VIDYA, VWAP, VWMA, and WMA. Each one is ploted two times (except SWMA and VWAP), one with a short period, and another with a long, both of which you can configure.
7 EMA 3 SMA with nameplatesScript provides 7 EMA (5 20 50 100 200 500 1000), 3 SMA (200 500 1000) with built-in nameplates for easier navigation. Different colors and widths from the start just to make your initial tuning a bit easier.
Based on Bubsan and Silkheat multicombo, heavily modified, but still huge kudos to guys for the base code.
Modifications: lengths adjusted, on-chart nameplates added, 2 EMA's added, SMA's reduced, static SMA's deleted.
Simple SMA Strategy Backtest Part 5Simple SMA strategy
In this stream, we will create an intraday trade cap.
WARNING:
- For purpose educate only
- This script to change bars colors
Stream:
www.tradingview.com
TEMA, DEMA and SMA with crosses with alert functionality
Just a crude but functioning ma indicator with bullish and bearish crosses and alert functionality.
Simple Moving Average CrossThe script uses 3 simple moving averages that you can define (SMA Top, SMA Mid, SMA Long).
Once the SMA Top is above the SMA Mid and the SMA Mid is above the SMA Top a long position is entered.
Once the SMA Top is below the SMA Mid and the SMA Mid is below the SMA Top a short position is entered.
You may define how long before these positions are entered by adjusting the bars in the Inputs section.
A setting of 0 will enter a position as soon as the conditions are met,
whereas a setting of 5 will wait 5 bars after the conditions are met before entering the positions.
SMA StrategyIn this strategy, I took advantage of two different sma intersections for buying and selling points. You can use the intersection of 2 sma values for buying and 2 separate sma intersection for selling.
The main purpose of this strategy is to calculate the rate of return of the indicator belonging to this system. You can access the indicator version from this link and set an alarm.
SMA Strategy - Indicator Version for AlertIn this indicator, I made use of two different sma intersections for buying and selling points. You can use the intersection of 2 sma values for buying and 2 separate sma intersection for selling.
There are 3 different alarms for those who want to set an alarm.
- Cross Alarm: The alarm that will work on buy-sell signals for those who have the right to set a single alarm.
- Buy Alarm: The alarm that will operate at the receiving point according to the values you specified.
- Sell Alarm: The alarm that will operate at the sales point according to the values you specify.
Koala System EURUSD 15minToday I bring you one of the best systems I have found for 15min chart for EURUSD, can be adapted to other pairs aswell I suppose.
Its made of 4 SMA 3 6 9 50 and EMA 200.
It only makes 1 trade per day, in this case we have a risk % of our total eqquity, being the min 0.1 lots , can be changed tho .
We target TP/SL the same 1:1 rr, in this case I use 30 pips for both., that means I risk maximum 30$ out of a total of 1000 equity , per each trade , with 3%
Entry is simple : price is below all movings averages for sell or above for buy. At the same time we check that the ma's are in ascending or descending order.
The key here is patience, never make more than one trade per day.
System always close the trade at the end of london session. Also it only works, during the london session.
Enjoy it.
Multi EMA+SMAMulti EMA+SMA with default value of 20/50/200 ... User can change value and color as required... As ema and sma both has same value thats why only three lines are visible, changing value will reflect other Moving averages. Hope it will help my trader friends.
Love
Indyan...
CryptoSignalScanner - Advanced Moving Averages - Cross & RainbowDESCRIPTION:
With this script you can plot 6 moving averages.
You can decide which Moving Average you want to show or hide.
For every plot you can decide to display the Simple Moving Average ( SMA ) or Exponential Moving Average ( EMA ).
It provides CrossOver and CrossUnder labels when loading the script. Those labels you can show or hide.
You have the possibility to show or hide the rainbow colors. This rainbow function gives you a clear view of the current trend.
HOW TO USE:
• When one Moving Average crosses above another Moving Average it signals an uptrend.
• When one Moving Average crosses below another Moving Average it signals a downtrend.
• The higher to length of the Moving Average the stronger the trend.
FEATURES:
• You can show/hide the preferred Moving Averages.
• You can set the length, type and source for every Moving Average.
• You can show/hide the rainbow colors.
• You can show/hide the CrossUp labels.
• You can show/hide the CrossDown labels.
• You can set alerts for every Moving Average.
• Etc...
DEFAULT SETTINGS:
• MA1 => EMA5
• MA2 => EMA10
• MA3 => EMA20
• MA4 => SMA50
• MA5 => SMA100
• MA6 => SMA200
Simple Moving Average vs. Exponential Moving Average:
SMA and EMA are calculated differently. The exponential moving average ( EMA ) focuses more on recent prices than on a long series of data points, as the simple moving average required.
The calculation makes the EMA quicker to react to price changes and the SMA react slower. That is the main difference between the two.
One is not necessarily better than another. It comes down to personal preference. Plot an EMA and SMA of the same length on a chart and see which one helps you make better trading decisions.
Moving Average Trading Strategies:
The first strategy is a price crossover, when the price crosses above or below a moving average, it signals a potential change in trend.
The second strategy applies when one moving averages crosses another moving average.
• When the short-term MA crosses above the long-term MA, it signals a buy signal.
• When the short-term MA crosses below the long-term MA, it signals a sell signal.
REMARKS:
• This advice is NOT financial advice.
• We do not provide personal investment advice and we are not a qualified licensed investment advisor.
• All information found here, including any ideas, opinions, views, predictions, forecasts, commentaries, suggestions, or stock picks, expressed or implied herein, are for informational, entertainment or educational purposes only and should not be construed as personal investment advice.
• We will not and cannot be held liable for any actions you take as a result of anything you read here.
• We only provide this information to help you make a better decision.
• While the information provided is believed to be accurate, it may include errors or inaccuracies.
If you like this script please donate some coins to share your appreciation.
Good Luck,
SEOCO
EMA_VTX
Abbreviations:
EMA - Exponential Moving Average
SMA - Simple Moving Average
WMA - Weighted Moving Average
VWMA - Volume-Weighted Moving Average
TP - TimePeriod (1m,2m,5m,1h....)
TP Steps - 1m,3m,12m,1h,5h,D (This steps i use)
Use-case:
Moving Average Exponential is a good indicator of Support and Resistance Level. Giving us average price level in particular moment.
This script calculates and plots Moving Average with minute precision, even if you want to see 21 EMA level from 1H chart.
So you can accommodate all important information on one chart with best precision.
Made for Intraday Perioads.
Best used for DayTrading, when you need to make quick and efficient decisions.
EMA_VTX = Preferred resolution * Length / Present resolution.
In addition to plotting EMA , you can quickly switch between SMA, WMA, VWMA .
Settings:
Resolution - Most used TP included, plus some exclusive paid plans (1m, 2m, 3m, 5m, 12m, 15m, 1h, 4h, 5h, Daily). Default set to 1h
Use - Bonus function for EMA indicator. You can quickly switch type from EMA to SMA, WMA,VWMA
Length - standard function. Default set to 144
Offset - standard function. Default set to 0
Source - standard function. Default set to hlc3
Why to use it ?
Yes, i know that variable TP is standard now in TradingView. But there are some limitations, especially for DayTraders.
Problem:
Imagine you are trading/scalping on 1m.. 5m.. 15.. charts and you want to see where are your Higher TP MAs.
-- You can change to 1h and check it, but you will loose the picture from smaller TP.
-- You can use Standard EMA TP function, but your MAs data will update every 15m, 1h (depends on TP)
Solution:
This script help to solve this problem, by breaking information down to 1m and building from there.
So whatever Intraday TP you choose to trade, your MAs will be updated with minute precision.
Limitations:
Sadly nothing without limitations.
1. You can experience "Reference too many candles in history" around 5K - This means that too many candles are used to plot MAs.
-- Quick fix: Reduce "Length" or Step down TP (best experience when projecting MAs 1-2 TP Steps up)
2. For Best performance use only Higher TP dividable By Yours (ex. You use 3m chart, then you can plot 12m, 15m, 1h / You use 5m chart, then you can plot 15m, 1h. 12m will already have 3m of information lost using 5m Chart )
Moving Average DoublesThis script plots multiple moving averages each source based on its previous MA, all having the same length.
Input options:
Simple Moving Average ( SMA ) or Exponential Moving Average ( EMA )
One adjustable look back period
Choose how many MA's to display, max. 50
One adjustable line width
It probably works best for long term views to find trends or zones of confluence, and it looks awesome :)
Don't be afraid to share your thoughts or settings in the comments. Enjoy!
MESA Adaptive Moving Average - Improved MTFThis indicator is a huge upgrade to my original MTF MESA
Plots are now extremely smooth and accurate on all timeframes **
Missing data points are automatically filled with the "best fit"
This is a Trend indicator and should be used to trade "top-down" aka:
Start with the Daily chart to confirm a trend
Move to 4H
2H
Etc...
Use your favorite entry method or simply watch for wicks forming when the price gets near the MESA adaptive moving average.
This is one of the few indicators that I've been using for years with success. Being able to plot both the current & higher timeframe MESA
can sometimes feel like cheating.
Due to the nature of the recursive calculation, you may notice slight differences between this version of MESA and others that either
approximate higher timeframes with fewer samples or make use of the latest "Resolution" argument in Pinescript V4. Both of which are
fine, until you start looking at M5 charts while plotting the Daily MESA.
As always, happy trading!
** Currently supports
M 1,3,5,15,30,45
H 1,2,3,4
Day 1
Week 1
Month 1
Percentage Price Over SMAReturn the percentage of closing prices greater than SMA's with periods within a user-selected range. An exponential moving average applied to these results is also displayed (in orange).
Settings
Min : Minimum period of the SMA in the range
Max : Maximum period of the SMA in the range
Smooth : Period of the EMA
Src : Input series of the indicator
Usage
The indicator is a normalized oscillator. A value of 100 indicates that 100% of the current closing price is over SMA's with periods ranging from min to max , this indicates a bullish market, while a value of 0 would indicate a bearish market.
In this image the indicator use min = 50 and max = 200, here AMD has been strongly bullish at the start, and ended being strongly bearish at the end, during this bullish period the indicator is over its overbought level, while it is under its oversold level during the bearish period.
In case the market is ranging we can expect the indicator to be around 50%, using the smoothed result might be more useful to detect ranging markets with this indicator.
If the smoothed result is within the overbought/oversold levels, then we can say that the market is either ranging or transitioning from a bullish/bearish market to an opposite one.
Scalpy MFI*Modified version of my Scalpy indicator replacing RSI with MFI*
It is made up of a 2 main parts.
- The cloud comprising of a 10 period SMA and a 30 period SMA .
- When the cloud is green you should be looking for long entries.
- When the cloud is red you should be looking for short entries.
- Price is most bullish above a green cloud and most bearish below a red cloud.
- Being within the cloud indicates indecision.
The red line represents the MFI
Minimum Variance SMAReturn the value of a simple moving average with a period within the range min to max such that the variance of the same period is the smallest available.
Since the smallest variance is often the one with the smallest period, a penalty setting is introduced, and allows the indicator to return moving averages values with higher periods more often, with higher penalty values returning moving averages values with higher periods.
Because variances with smaller periods are more reactive than ones with higher periods, it is common for the indicator to return the value of an SMA of a higher period during more volatile market, this can be seen on the image below:
here variances from period 10 to 15 are plotted, a blueish color represents a higher period, note how they are the smallest ones when fluctuations are more volatile.
Indicator with min = 50, max = 200 and penalty = 0.5
In blue the indicator with penalty = 0, in red with penalty = 1, with both min = 50 and max = 200.
On The Script
The script minimize Var(i)/p with i ∈ (min,max) and p = i^penalty , this is done by computing the variance for each period i and keeping the smallest one currently in the loop, if we get a variance value smaller than the previously one found we calculate the value of an SMA with period i , as such the script deal with brute force optimization.
For our use case it is not possible to use the built-in sma and variance functions within a loop, as such we use cumulative forms for both functions.
Index SMA vs. CloseVery simple script that index the close price with the SMA 20,50 and 200. It is very useful to plot and see if stocks are extended vs. de SMAs.
SIMPLE MOVING AVG 10,20,50,100,200 with RESOLUTIONThis indicator is the best than all other sma indicators.Because in just one click you can change all the resolution /time frames for all the sma .
Multitime frame analysis can be done in just one click. just change the resolution to
15 min/30 min/1hr- if you intraday trader
1D- LONG TERM INVESTORS.
Multi-timeframe analysis (MTF) is a process in which traders can view the same ticker/indicator using a higher time frame than the chart’s, for example, displaying a daily moving average on a one-hour chart in just two clicks.
How to Use this to Buy Stocks ?
The technical indicator known as the Death cross occurs when the 50-day SMA crosses below the 200-day SMA => Bearish Signal.
An opposite indicator, known as the Golden cross, occurs when the 50-day SMA crosses above the 200-day SMA => Bullish Signal.
Crossovers are one of the main moving average strategies.
1st Strategy is the first type is a price crossover, which is when the price crosses above the sma => Buy signal
when the price crosses below the sma => Sell signal
2nd Strategy is to apply two moving averages to a chart: one longer and one shorter.
When the shorter-term MA (100) crosses above the longer-term MA (200), it's a buy signal, indicates trend is shifting up.
This is known as a "Golden cross."
Meanwhile, when the shorter-term MA (100) crosses below the longer-term MA (200), it's a sell signal, indicates trend is shifting down.
This is known as a "Dead/death cross."
The time frame or length you choose for a moving average, also called the "look back period," can play a big role in how effective it is.
An MA with a short time frame will react much quicker to price changes than an MA with a long look back period. In the figure below, the 20-day moving average more closely tracks the actual price than the 100-day moving average does.
A 20-day MA = more beneficial to a shorter-term trader, since it follows the price more closely.
A 100-day MA = more beneficial to a longer-term trader.
Moving averages work quite well in strong trending conditions but poorly in choppy or ranging conditions.
use this indicator along with Price action theory and not alone.
Moving average crossovers are a popular strategy for both entries and exits. MAs can also highlight areas of potential support or resistance
Happy Trading
Median Absolute Deviation Filtered SMA & BBMedian Absolute Deviation (MAD) is a robust measurement of variability and more resilient against outliers and small samples.
This experiment uses MAD as a means of filtering outliers from an SMA calculation. First we construct the equivalent of a Bollinger Band, but based on the median as the basis and a multiple( k ) of MAD as the outlier cutoff.
k can be set a number of ways. As a simple multiple (3 - very conservative / 2.5 - moderately conservative / 2 - poorly conservative). Alternatively MAD can be used as an estimator of standard deviation by using a multiple of 1.4826 (SD1 - 1.4826 / SD2 - 2.9652 / SD3 - 4.4478).
Once we have a cutoff range an SMA is calculated with the outliers filtered out. Additionally a Bollinger band can be output using the filtered SMA as the basis and a multiple of the MAD instead of SD for the bands.
Percentage Of Rising MA'sReturn the percentage of rising moving averages with periods in a custom range from min to max , with the possibility of using different types of moving averages.
Settings
Minimum MA Length Value : minimum period of the moving average.
Maximum MA Length Value : maximum period of the moving average.
Smooth : determine the period of an EMA using the indicator as input, 1 (no smoothing) by default.
Src : source input for the moving averages.
Type : type of the moving averages to be analyzed, available options are "SMA", "WMA" and "TMA", by default "SMA".
Usages
The indicator can return information about the main direction of a trend as well as its overall strength. A value of the indicator above 50 implies that more than 50% of the moving averages from period min to max are rising, this would suggest an uptrend, while a value inferior to 50 would suggest a down-trend.
On the chart, a ribbon consisting of simple moving averages from period 14 to 19, with a color indicating their direction, below the indicator with min = 14 and max = 19
The strength of a trend can be determined by how close the indicator is to 0 or 100, a value of 100 would imply that 100% percent of the moving averages are rising, this indicates a strong up-trend, while a value of 0 would suggest a strong down-trend.
Using different types of moving averages can allow to have more reactive or on the contrary, less noisy results.
Here the type of moving average used by both the ribbon and the indicator is the WMA, the WMA is more reactive than the SMA at the cost of providing less amount of filtering. On the other hand, using a triangular moving average (TMA) provide more filtering at the cost of being less reactive.
Finally, irregularities in the indicator output can be removed by using the smooth setting.
Above smooth = 50.
Details
The indicator is based upon a for loop, this implies that both the sma, wma or change functions are not directly usable, fortunately for us, it is possible to get the first difference of both the SMA, WMA and TMA without relying on a loop by using simple calculations.
The first difference of an SMA of period p is simply a momentum oscillator of period p divided by p , there are two ways to explain why this is the case, first, simple math can prove this, the first difference of an SMA is given by:
(x + x + ... + x )/p - (x + x + ... + x )/p
The repeating terms cancel each other out, as such, we end up with
(x - x )/p
which is simply a momentum oscillator divided by p , since this division doesn't change the sign of the output we can leave it out. We can also use impulses responses to prove this, the impulse response of a simple moving average is rectangular, taking the first difference of this impulse response will give the impulse response of a momentum oscillator, with the only difference being that the non-zero values of the result will be equal to 1/p instead of 1.
The same thing applies to the WMA
above the impulse response of the first difference of a WMA, we can see it is extremely similar to the one of a high pass SMA, only 1 bar longer, as such we can have the first difference of a WMA quite easily. The TMA is simply a 2 pass SMA (the SMA of an SMA), as such the solution is also simple.
Simple SMA Strategy Backtest Part 4Added Take Profit and Stop Loss logic.
Part 4 :
www.tradingview.com
Part 3:
www.tradingview.com