Find Best Performing MA For Price CrossoverHello!
This script calculates the average percentage gain/loss following a price crossover of a moving of any length, up until prices cross back under the MA.
The script calculates the average number of candles that the source (i.e. close, open, low, ohlc4) remains above the moving average until crossing back under, in addition to the number of crosses. Performance is listed from best to worst; descending order. Also listed is the HIGHEST cumulative gains of ALL tested moving averages.
The moving average length can be changed to any number, so long as there are enough data points, on ANY timeframe and the script will recalculate.
Üstel Hareketli Ortalama (EMA)
Triple MA Buy SellThis simple script show potentiel trade entry points using 3 MA, can be switch by EMA and SMA type.
Adjust the MA(s) Length depending pairs and timeframe you use.
Buy & Sell labels can be display by input settings.
Action are take by the following rule:
Long signal:
MA3 > MA2 > MA1
Short signal:
MA1> MA2 > MA3
Add some filters is really needed to make this usable.
using my "Flat Detect By Bollinger Bands" indicator can be a debut
VwapWhaleBasically it is an indicator that is based on different vwap
You have the vwap of the day, of the week, and the vwap at overbought and oversold levels.
This will help you distribute the different buy and sell orders. think like a whale
You no longer have an excuse to make money.
You have a twap line with the volumes that are generated over the session. Every band can be used to help you to your target profits in every trade direction
Remember to put it in a "session" timeframe, as it is useful for scalping and daytrading.
Trading tips:
The vwap of the week, if it is below, acts as support. If it is above it acts as resistance, and gives you a slight idea of the market trend. During the day, the candles will be attracted to the different vwap , with the vwap of the session having greater weight. The different vwaps can be considered as zones of order diversification
Let me know if was useful for you :)
Thanks for the idea -
-dysrupt
-jaggedsoft
Close strength lineThe close strength line shows how much the strength in the current up/down trend actually present.
We calculate it by difference between High-Low and the way it moves with respect to Close moving averages.
You can change intervals from settings.
Use this in combination with any other moving average indicator e.g. EMA 13
when Close line is below other indicators/priceline, it is Uptrend and close line acts as support.
when Close line is above other indicators/priceline, it is Downtrend and close line acts as resistance.
You can also use Close line as potential Targets for Buy or Short trades depending on it's direction with respect to price line last Close.
EMA Oscilator [Azzrael]Just one more simple and useless Oscilator based on EMA. I've used Standard Deviation of (close - ema) to show overheated zones.
EMA Cross wth BiasThe Script plots 4 Moving averages.
1. Short Moving Average
2. Medium Moving Average
2. Trend Bias (Usually a much slower Moving Average) - Plots in Green when price action is above the line and Red for when price action is below the line.
3. Alerts are triggered when the short MA/ EMA turns. Can be used for Early Entry signals and Exits.
4. Alerts are triggered for Crosses of the Short and Medium MA
Each Moving average line can be confirmed to be a Simple MA or and EMA
Godson Advanced Crossover ScriptThe Godson Advanced Crossover Script is advanced because it does two things
1: as a trend following indicator the script uses 2 VWAP ema's offset by 1 day(this is adjustable) and an ATR upper and lower band to find entries into larger trends.
2: it also allows you to setup alerts on a lower timeframe that follow a higher timeframe for example, if the 12hr is bearish(candles are red), you can trade shorts only in the 15min timeframe.
The script produces 3 signals
L: this is a long signal, this is signaled when the ema's crossover and the candle breakouts of the ATR bands, if the signal agrees with the upper trend
S: this is a short signal, it signals when the ema's crossunder and the candle breaks down of the ATR bands, if the signal agrees with the upper trend
H: this is for anything in-between, A is for apple, H is for Hedge.
you can set the upper trend timeframe to the same as the lower trend if you want all signals to alert
you can also turn the lines on or off if you need to visualize things
i will update this script as we progress
The One Trader Toolkit - Open AccessThis script is the open version of my existing invite-only script of the same name and has been opened for access to the community to use, but not modify or clone in any way.
This has been done as the invite-only script cannot be changed back to a public script and vice-versa, keeping in line with Tradingview House Rules.
The code is based on a full strategy that has been explained in detail as follows:
// Step 1:
// We will consider the 200ema a standard to assess the average price over the longer term.
// If the current price on the daily chart is seen above the 200ema, we will consider that the stock is in a long term uptrend.
// If the current price on the daily chart is seen below the 200ema, we will consider that the stock is in a long term downtrend.
// In order to assess the long term trend, a band is plotted between the CLOSE (Average price), HIGH (Average High Price), LOW (Average Low Price) of the last 200 days.
// This band has been color coded for easy visual recognition. Green fill between ema close and ema high. Red fill between ema close and ema low.
// The methodology explains that the trader should have a long bias when the price is above the green part of the band and a short bias while price is below the red part of the band.
// Step 2:
// Now we come to a lower timeframe analysis with the 200ema moving average on the hourly timeframe.
// This is marked by a very distinct solid blue line which cannot be missed.
// If the price is still above this moving average and correlates with the higher timeframe trend in step 1, then we will continue our analysis.
// Otherwise, the stock is not ready to be filtered down and we will move to another stock.
// Step 3:
// On the same hourly timeframe, we will continue further analysing the position of a red 50ema line as compared to the same blue 200ema line or a separetely plotted gray 200ema line.
// If the 50ema is above the blue or the gray 200ema line (and in correlation with trend in steps 1-3), then the stock is believed to be bullish.
// If the 50ema is below the blue or the gray 200ema line (and in correlation with trend in steps 1-3), then the stock is believed to be bearish.
// Step 4:
// After multiple confirmation of a continuing trend, we will try to ascertain a good entry point.
// On the one hour timeframe, we will apply the Phase Changer.
// Phase Changer configuration is derived from a common setup which includes the 8ema and 20ema lines.
// I have implemented it in the Indian stock market setup with an added theory that we ignore the Phase Changer position on any timeframe higher than hourly timeframe.
// So the Phase Changer is not only an indication of the continuing trend, but also a great indicator of what the price is trying to achieve through its interaction with the lines.
// If 8ema is above the 20ema on the hourly chart, then the stock is believed to be bullish.
// If 8ema is below the 20ema on the hourly chart, then the stock is believed to be bearish.
// The same will be done on 15 minutes timeframe.
// In either setup, if there is a pullback and price is touching any of the two ema lines and eventually gets rejected towards the continuing trend, then it is an indication of a good entry at the failure of the pullback.
// Step 5:
// After confirmation through Daily, Hourly and 15 minutes timeframes, we will now come to the execution (5 Minute) timeframe.
// Apply the breakfast range. This is the range formed during the first hour of trading.
// The high of the first hour and the low of the first hour form the breakfast breakout.
// This method is also widely known as Open Range Breakout (ORB).
// The breakfast range is commonly used for stock indices only on a Monday morning, we use it for all days of the week and mostly on stocks.
// If the breakout is consistent with the trend that we have been confirming since step 1, we will enter the trade.
// Step 6:
// An additional daily range has been plotted for those who would like to trade the breakout of the daily range.
// This is the sum of the open price of the day the range of the previous day.
// The green line is used as resistance and the red line is used as support.
// Any breakout of those lines will be considered a strong continuation of the trend, mostly until the end of the trading session.
// Miscellaneous
// The first hour of the trading day is marked yellow with a black solid bar marked at the end of the first hour.
// All trades will be taken only after 10:20am.
// Stoploss Settings
// We will be calculating stoploss with the help of the ATR values.
// I have defined two stop loss levels, one for safe traders and the other for aggressive traders.
// Safe traders will select the safe option in a long trade or short trade respectively and mark the stoploss indicated at the time of taking the breakout entry.
// Aggressive traders on the other hand will select the aggressive stop loss option in long or short trades respectively and mark the stoploss indicated at the time of taking the breakout entry.
RSI CandlesRSI Candles
HOW Does it work ?
* RSI - Relative Strength Index is a very well known to understand the trend strength, Many researches have been done on RSI.
* The Indicator defines itself as the Candles are formed of RSI Value of Defined Length and Chart Time Frame.
RSI Candles comprises of following --
* Candles formed from RSI value.
* Predefined Moving average limited line for breakout.
* Up Trend Area, Down Trend Area, Consolidation Area when RSI is in-between 55 to 45.
User Inputs --
# User can change length of RSI.
# Over Bought / Sold values can be changed.
How to learn the trend ?
# Time Frame shall be more than 2 min. for better outcome.
# If the market is below the line then look for falling in RSI and one can learn the down trend.
# Over bought / Over sold be clearly seen in chart so trend reversal can be grabbed.
# The data for the indicator will be very restricted, most of the parts in indicator wont work when the market closes.
# Pre-Opening or Post -Market data is tried to be ignored.
# Utmost Care is taken to implement the suggestions of users and also tried to keep the chart neat and clean.
Disclaimer
# The indicator to be used for understanding / learning the markets.
# User is responsible for his / her profits / losses, that may occur during the markets.
INVEST BTC (from @tradinglord)The script highlight point of interest for investors using EMA, RSI and a bit of criticism.
The script is built to be used on a weekly timeframe
When RSI is bellow 35 it can be interesting to invest in BTC, on the opposite when it is above 80 can be where to take a bit of profits.
Also using EMA to flow with the power of the trend or change your bias depending on conditions.
Feel free to use the included alerts to be informed when RSI is telling you something.
The idea is quite simple, and you will not gain x100 your investment, but with these kind of investments and some patience you could make your way out.
Obviously not financial advice, understand what you are doing.
"Sometimes it's better to be rational monkey than a greedy baboon" - Tradinglord 2022
TASC 2022.03 Relative Strength Volatility-Adjusted EMA█ OVERVIEW
TASC's March 2022 edition of Traders' Tips includes the "Relative Strength Moving Averages - Part 3: The Relative Strength Volatility-Adjusted Exponential Moving Average" article authored by Vitali Apirine. This is the code that implements the "RS VolatAdj EMA" from the article.
█ CONCEPTS
In a three-part article series, Vitaly Apirine examines ways to filter price movements and define turning points by applying the Relative Strength concept to exponential moving averages . The resulting indicator is more responsive and is intended to account for the relative strength of volatility .
█ CALCULATIONS
The calculation process uses the following steps:
Select an appropriate volatility index (in our case it is VIX ).
Calculate up day volatility (UV) smoothed by a 10-day EMA.
Calculate down day volatility (DV) smoothed by a 10-day EMA.
Take the absolute value of the difference between UV and DV and divide by the sum of UV and DV. This is the Volatility Strength we need.
Calculate a MLTP constant - the weighting multiplier for an exponential moving average.
Combine Volatility Strength and MLTP to create an exponential moving average on current price data.
Join TradingView!
The 20MA gameThis indicator shows us if the price is moving up or down based on the 20MA of the 20MA.
If the line is green then this indicates that the price is moving up, and if red the price is moving down.
How to use:
Not applicable here because its all about the 20MA.
Markets:
It can be used to all markets.
Multiple Timeframe continuity with Crossover Alerts█ OVERVIEW
This Indicator calculates the EMA 9/20 and the RSI with its SMA on multiple timeframes and indicates their crossings. In addition this script alerts the user when crossings appear.
█ USAGE
Use the checkboxes to activate different timeframes. With the dropdown menu you can select the timeframe in minutes.
Furthermroie use the checkboxes to activate different crossovers. At the end of the settings you can find the same options for the RSI.
You can also let the script indicate only the overlapping of both indicator crossovers by using the combination option.
█ KNOWLEDGE
EMA: The ema function returns the exponentially weighted moving average. In ema weighting factors decrease exponentially. It calculates by using a formula: EMA = alpha * source + (1 - alpha) * EMA , where alpha = 2 / (length + 1).
SMA: The sma function returns the moving average, that is the sum of last y values of x, divided by y.
RSI: The RSI is classified as a momentum oscillator, measuring the velocity and magnitude of price movements. Momentum is the rate of the rise or fall in price. The RSI computes momentum as the ratio of higher closes to lower closes: stocks which have had more or stronger positive changes have a higher RSI than stocks which have had more or stronger negative changes.
RMA: Moving average used in RSI. It is the exponentially weighted moving average with alpha = 1 / length.
(Source: TradingView PineScript reference & en.wikipedia.org)
█ Credits
Thanks to @KhanPhelan with his EMA 9/20 trading idea
Credits to TradingView for their RSI function
█ Disclaimer
This is my first Script, any feedback is welcome.
Ergodic Mean Deviation Indicator [CC]The Ergodic Mean Deviation Indicator was created by William Blau and this is a hidden gem that takes the difference between the current price and it's exponential moving average and then double smooths the result to create this indicator. This double smoothing of course creates a lag that allows it to give off a sustained buy signal during a bullish trend and vice versa. This is a very fun indicator to experiment with and surprised that no one on here gives William Blau much attention so I will go ahead and publish the rest of his scripts eventually. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish!
Reversal off EMA-XsEMA-Xs works mostly on Forex due to the small prices and price fluctuations. It does work on Gold, oddly enough, and some others like UKX 100...but mostly on forex. It doesn't work as well on JPY pairs but occasionally does; the JPY pairs give less signals, but when a JPY pair gives a signal, its a high probability setup. Another script EMA-XL works better on the higher priced instruments like S&P, DJI, OIL, BTC etc.
This script will show 3 moving averages: 13, 34, 200 and works on the 5m, 1hr, 4hr, daily charts. Signals "B" or "S" will be on the chart above or below the candles respectively.
When to open:
The script gives buy and sell signals based on a counter-trend move away from the MA's. When the price rises a specific percent above/below the EMA, it'll give a signal. It's best to take a trade when it gives a cluster of consecutive signals near the same price. If using on the 5m, definitely wait for consecutive signals. Also, use this in conjunction with support and resistance areas. Using with fibs for confirmation really makes this a good tool with high probability: IE, when price hits a fib and the script gives a signal, its a high probability setup.
When to close:
1. After a fast move up/down you may use this to counter trade a scalp 10+ pips, but you need to be quick; applies mostly to the 5m chart.
2. If you have the tenacity wait until you see an opposite signal. With this method you may be holding a loosing trade for a while. But what I've noticed is if it trends against you, price usually with come near to the first time it signaled. You may want to stack trades on each cluster of signals. IE first trade is 1000 units, next is 2000 units, etc... then close when prices comes near the first time it signaled. By this time, if you held, you should have profit. This strategy will really test your mental resilience.
3. Wait until it comes back to one of the trendlines; remember this is a counter trend signal so price is moving away from the MA and it always returns to touch one of the MA's...LOL eventually
4. Applying to scalping on the 5m, keep the stops tight because if the instrument trends hard and fast, you'll be upside-down quickly.
If you put a lot of time into using this signal generator, you can really make good profit. But with all tools, you need to master it. There are nuances to the simple logic of this script that can be both fun and frustrating. With all endeavors, if you put the time into it, you will reap the rewards.
Good luck and let me know if you have any questions/comments.
CF - KAMI KAMI EMA-HMA-VWMA SCALPERThis is your dark knight, your shining light in the crypto darkness... It's you and me against the machine..... rage, rage against the dying of the night!
This my greedy minions is the ticket..... the disruptive technology, the red pill, that breaks the Matrix.... get ready to join the revolution.
DESCRIPTION:
Lowest green/red line
The lowest alternating green red band is simply a general market indicator. It's EMA 50 over 200. This is a generally good indicator of current market conditions. If the band is red, you should favor taking short positions. If the band is green, long positions.
The three MA colored bands
This sophisticated indicator uses 3 central MA's in calculating its goodness. The HMA (Hull's Moving Average), at the bottom (of the three principal bands), is the most sensitive and responsive to immediate market conditions. It will generally give you the signal to enter or exit at the beginning of the price action move. But, this could also be a "false" signal - that doesn't continue in the expected direction.
The middle band is VWMA, volume-weighted moving average, and it is sensitive to volume - so it may turn green or red faster as volume increases or decreases. It gives somewhat similar signals to the top moving average which is the EMA or exponential moving average.
The GREEN RED signals
The signals below the bands which are true green and true red are "SUPER" signals which represent that all of the six small bands of each MA agree. These are very strong signals to enter and exit a position. If multiple SUPER signals agree this is even more confirmation.
SETTINGS
You can change the ema signals. They are currently optimized for scalping, but this indicator can work for larger timeframes.
I couldn't make this open-source as it represents a lot of work to get it to this point. If you are interested in this indicator and would like to have a custom version coded for your purposes, let me know.
Distance from EMA LevelsDisplay up to 4 distance from EMA levels, by default it's based on the 5m timeframe.
MTF EMA TrendThe indicator plots directional arrows on top of the chart to visualize the market's price trend. The plots are based on candle closing below all three multitimeframe EMAs, downtrend, when the EMAs are also in order (1 below 2 and 2 below 3). Opposite situation is uptrend.
It also marks a breakdown when the price closes under the third (supposedly always the slowest) EMA outside of aforementioned downtrend situation. Opposite is true for breakup to be marked.
Please always make sure, that the three EMAs are in order of EMA 1 being the fastest and 3rd the slowest. Default settings are used on the 5 minute timeframe.
Indicator can be used to quickly check the overall trend of the market as told by three MTF EMAs without needing to clutter the chart with the actual EMA plots. This is useful, for example, if you mainly base your scalping trades on other types of indicators, but you want a quick peek of the market direction or indecision.
SAR+RSI+EMAs SignalsNOTE:
Indicator based strategies may expire and begin to work again. There are various ways to check the expiration of these strategies but I suggest equity curve trading (EC trading) as the best one.
Please check every single indicator based strategy to see if it’s still profitable or it has been expired to avoid losses.
Principles:
I personally believe every profitable indicator-based setup need 3 factors. Actually I analyze indicator-based set up in this way!
1- Trend detector: a tool that detect the “trend”.
2- Oscillators (Discount finder): a tool that detects “discounts” in the direction of the trend.
3- Stimulus: A tool that indicates the Initiation of a movement.
There may be profitable strategies that do not use all three, because other factors are strong enough to lead us to profit, but they are rare and sometimes they hide the other forgotten factor in the main two ones.
Elements:
(Since most of traders here, are familiar with these famous indicators I will not take your time to write about their uses and formula)
SAR: As a Trend detector, regarding position of close and SAR
EMA 7 and EMA 21: As trend detectors, regarding position of EMA 7 as fast “moving average” and EMA 21 as slow one. Also we need another confirmation for trend regarding EMA 7 and closing price of the signal candle.
RSI: In this strategy RSI is used both as a discount finder and a stimulus.
For RSI being over/under 50, regarding the trend, a possible discount may have been occurred. Imagine these conditions: close>EMA7, EMA7>EMA21, close>SAR and simultaneously RSI being under 50 is really a sign of powerful uptrend which it’s RSI decreasing might be a sign of corrective move, which will be following a bullish impulsive move.
The other use of RSI is to stimulate a buy signal by “crossing” over 50 or 30 (50 as balanced point of momentum and 30 as a sign of ending an oversold) or stimulate a sell signal by “crossing” under 50 or 70 (50 as balanced point of momentum and 70 as a sign of ending an overbought).
Entry point: you can use one of the followings.
1- Open of the next candle
2- EMA 7
3- Open of the signal candle
(Totally optional but “open of the next candle” is suggested by me.)
SL: Use one of the followings.
1- SAR or some pips (regarding ATR Or your experience of this trading instrument’s fluctuations in this time frame) below the SAR
2- Fixed amount (regarding ATR Or your experience of this trading instrument’s fluctuations in this time frame)
3- Use EMA21 as dynamic SL (if a candle far enough from the initiative candle close over (for sell) below ( for buy)
Again number 1 is suggested by me.
TP: Use one of the followings.
1- Use static levels or zones of support and resistance as TP.
2- Use dynamic levels for instance band of BB or moving averages (Moving the SL is possible).
3- Use fixed R to R
And I believe static zones of support and resistance work better.
Examples:
I indicate a buy signal on the chart!
Using local level as TP worked just good.
Using EMA was better in this case.
And using a riskier level or a fixed R to R is obvious in the chart!
Since in the range markets, this strategy may not work well and at the same time, TP to SL might be too small to be worth the risk, I prefer to use levels to filter range market conditions!
I convert all those circumstances to a simple buy and sell signs on the chart!
EMA21 and SAR are still visible because it is possible that traders use them for their TP and SL.
This is how it look without EMA21 and SAR!
Another screenshot of this strategy!
I also add a check box to filter signals by another trend detector. MATD created by me to help traders detect trend!
As it’s visible, some profitable signals filtered too, but using a longer-term trend detector as an additional one, alongside the double EMAs is very useful for this strategy.
The other box “use high&low instead of close for fast EMA” makes the “EMA7 and close” trend detector an easygoing one!
Almost everything is editable here!
*** I did not invent this strategy, you can find it for free on net ***
I'll change it to a "strategy" instead of an indicator if reader like to!
Ehlers Median Average Adaptive Filter [CC]The Median Average Adaptive Filter was created by John Ehlers and this is another in my current series of undiscovered gems. I'm sure you are all saying but Franklin, Ehlers doesn't have any undiscovered gems but in this case you would be wrong. This was actually an indicator so buried on the internet that I had to use the wayback machine to find the original source code. Ehlers notoriously hates adaptive moving averages which is funny because he has made a decent amount of them. This is a very unique indicator that uses a while loop to adjust the length and I thought it deserved some extra recognition from the TV community. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts or indicators you would like to see me publish!
Pattern Recognition Pullback Strategy profit calculatorThis script has been designed for use in botting Crypto spot / futures.
The intended use is send signals to a 3commas bot setup for the exchange. The bot uses candle measuring percentile nearest rank filters and range
breakouts to decide if the market is trending. When the market is trending it will look for pullbacks below a moving average and buy in the trend direction on a pullback discount. This is the profit calculator part of the script
With this script you will not be able to send tradingview signals, that is because it is a payed premium service and for security reasons I am the only one with access to making signals from this script.
I provided a user manual:
drive.google.com
Pattern Recognition Pullback StrategyThis script has been designed for use in botting Crypto spot / futures.
The intended use is send signals to a 3commas bot setup for the exchange. The bot uses candle measuring percentile nearest rank filters and range
breakouts to decide if the market is trending. When the market is trending it will look for pullbacks below a moving average and buy in the trend direction on a pullback discount.
With this script you will not be able to send tradingview signals, that is because it is a payed service and for security reasons I am the only one with access to making signals from this script. I will be uploading a second script which is the profit calculator. This way you can toy around to find your preferred settings for the bot and see the results it could have made.
I provided a user manual:
drive.google.com
MACD Cross [Momentum & Trend Filter]This is MTF MACD crossover and crossunder, with EMA trend filter and MTF RSI overbought/oversold filter.
Guidelines:
- User can set stop loss, take profit target and risk to reward ratio in setting
- ATR Stop and ATR Multiplier are use to set stop loss and take profit levels, setting are varies depend on what you are trading, play around and find appropriate number
- Don't trade if range between stop loss and target profit are too small or if there are too many small range try to increase multiplier
- If MACD Zero Line Filter enable, detect MACD crossover only under zero line for LONG, and detect MACD crossunder only above zero line for SHORT
- If EMA Trend Filter enable, detect MACD crossover which price above EMA for LONG, and detect MACD crossunder which price below EMA for SHORT
- RSI timeframe 1-3 should not lower than chart timeframe to display Overbought and Oversold correctly
- Enable MTF Overbought and Oversold just to display red background for Overbought, and green background for Oversold
There are 3 alert options:
(For those free user which can get only 1 alert, please choose "MACD crossover & crossunder" if you want to get alert for both long and short directions)
Have fun :)