Media mobile esponenziale (EMA)
AITI Investa: Trend FollowingScript ini dibuat untuk membantu strategi trend following harian pada saham-saham di IHSG.
Terdiri dari:
1. Petunjuk visual untuk area trend yang sebaiknya dihindari ( bearish trend ), berupa background berwarna merah. Dimana area bearish trend adalah ketika garis fast ema berada di bawah garis slow ema .
2. Batas stop loss / trailing stop, dengan acuan nilai ATR.
Script ini tidak memberikan sinyal buy. Silakan gunakan strategi buy on weakness/breakout sesuai analisa dan preferensi masing-masing. Untuk mencari entry trigger, penulis merekomendasikan untuk menarik garis support/resistance manual dan digabungkan dengan indikator MACD & CCI sebagai konfirmasi.
-AITI Investa
MACD-X, More Than MACD by DGTMoving Average Convergence Divergence – MACD
The most popular indicator used in technical analysis, the moving average convergence divergence (MACD), created by Gerald Appel. MACD is a trend-following momentum indicator, designed to reveal changes in the strength, direction, momentum, and duration of a trend in a financial instrument’s price
Historical evolution of MACD,
- Gerald Appel created the MACD line,
- Thomas Aspray added the histogram feature to MACD
- Giorgos E. Siligardos created a leader of MACD
MACD employs two Moving Averages of varying lengths (which are lagging indicators) to identify trend direction and duration. Then, MACD takes the difference in values between those two Moving Averages (MACD Line) and an EMA of those Moving Averages (Signal Line) and plots that difference between the two lines as a histogram which oscillates above and below a center Zero Line. The histogram is used as a good indication of a security's momentum.
Mathematically expressed as;
macd = ma(source, fast_length) – ma(source, slow_length)
signal = ma(macd, signal_length)
histogram = macd – signal
where exponential moving average (ema) is in common use as a moving average (ma)
fast_length = 12
slow_length = 26
signal_length = 9
The MACD indicator is typically good for identifying three types of basic signals ;
Signal Line Crossovers
A Signal Line Crossover is the most common signal produced by the MACD. On the occasions where the MACD Line crosses above or below the Signal Line, that can signify a potentially strong move. The standard interpretation of such an event is a recommendation to buy if the MACD line crosses up through the Signal Line (a "bullish" crossover), or to sell if it crosses down through the Signal Line (a "bearish" crossover). These events are taken as indications that the trend in the financial instrument is about to accelerate in the direction of the crossover.
Zero Line Crossovers
Zero Line Crossovers occur when the MACD Line crossed the Zero Line and either becomes positive (above 0) or negative (below 0). A change from positive to negative MACD is interpreted as "bearish", and from negative to positive as "bullish". Zero crossovers provide evidence of a change in the direction of a trend but less confirmation of its momentum than a signal line crossover
Divergence
Divergence is another signal created by the MACD. Simply, divergence occurs when the MACD and actual price are not in agreement. A "positive divergence" or "bullish divergence" occurs when the price makes a new low but the MACD does not confirm with a new low of its own. A "negative divergence" or "bearish divergence" occurs when the price makes a new high but the MACD does not confirm with a new high of its own. A divergence with respect to price may occur on the MACD line and/or the MACD Histogram
Moving Average Crossovers , another hidden signal that MACD Indicator identifies
Many traders will watch for a short-term moving average to cross above a longer-term moving average and use this to signal increasing upward momentum. This bullish crossover suggests that the price has recently been rising at a faster rate than it has in the past, so it is a common technical buy sign. Conversely, a short-term moving average crossing below a longer-term average is used to illustrate that the asset's price has been moving downward at a faster rate and that it may be a good time to sell.
Moving Average Crossovers in reality is Zero Line Crossovers, the value of the MACD indicator is equal to zero each time the two moving averages cross over each other. For easy interpretation by trades, Zero Line Crossovers are simply described as positive or negative MACD
False signals
Like any forecasting algorithm, the MACD can generate false signals. A false positive, for example, would be a bullish crossover followed by a sudden decline in a financial instrument. A false negative would be a situation where there is bearish crossover, yet the financial instrument accelerated suddenly upwards
What is “MACD-X” and Why it is “More Than MACD”
In its simples form, MACD-X implements variety of different calculation techniques applied to obtain MACD Line, ability to use of variety of different sources , including Volume related sources, and can be plotted along with MACD in the same window and all those features are available and presented within a single indicator, MACD-X
Different calculation techniques lead to different values for MACD Line, as will further discuss below, and as a consequence the signal line and the histogram values will differentiate accordingly. Mathematical calculation of both signal line and the histogram remain the same.
Main features of MACD-X ;
1- Introduces different proven techniques applied on MACD calculation , such as MACD-Histogram, MACD-Leader and MACD-Source, besides the traditional MACD (MACD-TRADITIONAL)
• MACD-Traditional , by Gerald Appel
It is the MACD that we know, stated as traditional just to avoid confusion with other techniques used with this study
• MACD-Histogram , by Thomas Aspray
The MACD-Histogram measures the distance between MACD and its signal line (the 9-day EMA of MACD). Aspray developed the MACD-Histogram to anticipate signal line crossovers in MACD. Because MACD uses moving averages and moving averages lag price, signal line crossovers can come late and affect the reward-to-risk ratio of a trade. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD
The MACD-Histogram represents the difference between MACD and its 9-day EMA, the signal line. Mathematically,
macdx = macd - ma(macd, signal_length)
Aspray's contribution served as a way to anticipate (and therefore cut down on lag) possible MACD crossovers which are a fundamental part of the indicator.
Here come a question, what if repeat the same calculations once more (macdh2 = macdh - ma(macdh, signal_length), will it be even better, this question will remain to be tested
• MACD-Leader , by Giorgos E. Siligardos, PhD
MACD Leader has the ability to lead MACD at critical situations. Almost all smoothing methods encounter in technical analysis are based on a relative-weighted sum of past prices, and the Leader is no exception. The concealed weights of MACD Leader are such that more relative weight is used in the more recent prices than the respective weights used by the components of MACD. In effect, the Leader expresses more changes in average price dynamics for the recent price movement than MACD, thus eventually leading MACD, especially when significant trend changes are about to take place.
Siligardos creates two less-laggard moving averages indicators in its formula using the same periods as follows
Indicator1 = ma(source, fast_length) + ma(source - ma(source, fast_length), fast_length)
Indicator2 = ma(source, slow_length) + ma(source - ma(source, slow_length), slow_length)
and then take the difference:
Indicator1 - Indicator2
The result is a new MACD Leader indicator
macdx = macd + ma(source - fast_ma, fast_length) - ma(source - slow_ma, slow_length)
• MACD-Source , a custom experimental interpretation of mine ,
MACD Source, presents an application of MACD that evaluates Source/MA Ratio, relatively with less lag, as a basis for MACD Line, also can be expressed as source convergence/divergence to its moving average. Among the various techniques for removing the lag between price and moving average (MA) of the price, one in particular stands out: the addition to the moving average of a portion of the difference between the price and MA. MACD Source, is based on signal length mean of the difference between Source and average value of shot length and long length moving average of the source (Source/MA Ratio), where the source is actual value and hence no lag and relatively less lag with the average value of moving average of the source . Mathematically expressed as,
macdx = ma(source - avg( ma(source, fast_length), ma(source, slow_length) ), signal_length)
MACD Source provides relatively early crossovers comparing to MACD and better momentum direction indications, assuming the lengths are set to same values
For further details, you are invited to check the following two studies, where the first seeds were sown of the MACD-Source idea
Price Distance to its Moving Averages study, adapts the idea of “Prices high above the moving average (MA) or low below it are likely to be remedied in the future by a reverse price movement", presented in an article by Denis Alajbeg, Zoran Bubas and Dina Vasic published in International Journal of Economics, Commerce and Management
First MACD like interpretation comes with the second study named as “ P-MACD ”, where P stands for price, P-MACD study attempts to display relationship between Price and its 20 and 200-period moving average. Calculations with P-MACD were based on price distance (convergence/divergence) to its 200-period moving average, and moving average convergence/divergence of 20-period moving average to 200-period moving average of price.
Now as explained above, MACD Source is a one adapted with traditional MACD, where Source stands for Price, Volume Indicator etc, any source applicable with MACD concept
2- Allows usage of variety of different sources, including Volume related indicators
The most common usage of Source for MACD calculation is close value of the financial instruments price. As an experimental approach, this study will allow source to be selected as one of the following series;
• Current Close Price (close)
• Average of High, Low, and Close Price (hlc3)
• On Balance Volume (obv)
• Accumulation Distribution (accdist)
• Price Volume Trend (pvt)
Where,
-Current Close Price and Average of High, Low, and Close Price are price actions of the financial instrument
- Accumulation Distribution is a volume based indicator designed to measure underlying supply and demand
- On Balance Volume (OBV) , is a momentum indicator that measures positive and negative volume flow
- Price Volume Trend (PVT) is a momentum based indicator used to measure money flow
3- Can be plotted along with MACD in the same window using the same scaling
Default setting of MACD-X will display MACD-Source with Current Close Price as a source and traditional MACD can be plotted eighter as a companion of MACD-X or can be selected to be plotted alone.
Applying both will add ability to compare, or use as a confirmation of one other
In case, traditional MACD Is plotted along with MACD-X to avoid misinterpreting, the lines plotted, the area between MACD-X Line and Signal-X Line is highlighted automatically, even if the highlight option not selected. Otherwise highlight will be applied only if that option selected
4- 4C Histogram
Histogram is plotted with four colors to emphasize the momentum and direction
5- Customizable
Additional to ability of selecting Calculation Method, Source, plotting along with MACD, there are few other option that allows users to customize the MACD-X indicator
Lengths are configurable, default values are set as 12, 26, 9 respectively for fast, slow and smoothing length. Setting lengths to 8,21,5 respectively Is worth checking, slower length moving averages will lead to less lag and earlier reaction to price actions but yet requires a caution and back testing before applying
Highlight the area between MACD-X Line and Signal-X Line, with colors emphasising the direction
Label can be added to display Calculation Method, Source and Length settings, the aim of this label is to server only as a reminder to trades to be aware of settings while they are occupied with charts, analysis etc.
Here comes another question, which is of more importance having the reminder or having the indicators with multi timeframe feature? Build-in Multi Time Frame features of Pine is not supported when labels and lines introduced in the script, there are other methods but brings complexity. To be studied further, this version will be with labels for time being.
Epilogue
MACD-X is an alternative variant of MACD, the insight/signals provided by MACD are also applicable to MACD-X with early and clear warnings for the changes in the trend.
If MACD is essential to your analysis, then it is my guess that after using the MACD-X for a while and familiarizing yourself with its unique character and personality, you will make it an inseparable companion to other indicators in your charts.
The various signals generated by MACD/MACD-X are easily interpreted and very few indicators in technical analysis have proved to be more reliable than the MACD, and this relatively simple indicator can quickly be incorporated into any short-term trading strategy
Disclaimer : Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Rally SequencesAnother simple indicator that you can use to get to know the major trends and bull markets. It only uses 4 different exponential moving averages. These are (55, 89, 144, 233)
The correct alignment you should see on the screen should be from top to bottom and from small to large.
Example: 55 should be at the top and 89, 144 and 233 below, respectively. When you see this sequence, it is simple to realize that you are in a major rising trend.
Monthly, weekly, daily and 4-hour periods are ideal. Less than 4 hours, deviations are possible.
System 20/8You can decide to trade with this very simple scenario. This system consists of 2 exponential moving averages ( EMA ) These are Ema 8 and Ema 20.
Recommended period is 4 hours.
When 8 Ema is above 20 Ema , positive zone and may be safer to trade. And the opposite is negative when it is.
This indicator is of course not a sufficient reason to decide on trading. It can only be one of the signals to guide.
MTF SMA on specific timeframe(5M-4H)Japanese below. 日本語の説明は下記
This is multi time frame simple moving average that is shown only on the specific timeframe; 5M, 15M, 30M, 1H, 4H.
Problem of conventional MTF moving average is that MTF MA is sometimes annoying especially when you look at upper timeframe such as daily chart and/or weekly chart.
e.g. You set 20 MA of 4 hour chart into 1 hour chart, however, when you look at daily chart, daily chart also shows 20MA of 4 hour chart which is unnecessary.
This is why I have developed this MTF SMA indicator shown only on the timeframe from 5M to 4 hour.
With this indicator, even if you set MA of upper timeframe(such as 4 hour) into Lower timeframe, that MA will not be shown on above daily chart.
You can customize adding or removing below code;
timeframe.period == “X”? security(syminfo.tickerid, res, sma(src, ma_len))
X is the timeframe that you would add/remove from the indicator.
——————————————————————————————
特定の時間軸にのみ表示されるマルチタイムフレーム移動平均線のインジケーターです。
従来のマルチタイムフレーム移動平均線の問題点は、上位足に切り替えた時にもマルチタイムフレーム移動平均線の設定が表示され、チャートが見にくくなる点でした。
例: 4時間足の20MAをマルチタイムフレーム移動平均線としてセットしたとします。この場合、1時間足などの下位足で4時間足の20MAが表示されることになりますが、同時に日足や週足といった上位足チャートを見る時にも、この4時間足の20MAが表示されてしまいます。
このインジケーターでは、従来のマルチタイムフレーム移動平均線と同様に、設定元となる上位足の時間軸(4時間、日足など)を選択し、期間とソースを設定することができる一方で、表示されるのは5分足、15分足、30分足,1時間足、4時間足のみとなります。
スクリプトのMAの取得部分に以下コードを追加することで、必要な時間軸を追加・削除することが可能です。
timeframe.period == “X”? security(syminfo.tickerid, res, sma(src, ma_len))
Xは表示したい時間軸です。4時間足チャートからこのインジケーターを削除したい場合は
timeframe.period == “240”? security(syminfo.tickerid, res, sma(src, ma_len))
を削除してください。
GM All-purposeThis script plots multiple EMA's also it shows you when a particular EMA crosses up or below another EMA. You can customize the EMA's based on your setups or preferences.
This script basically will help you easily identify when a particular EMA has crossed over or crossed under another EMA at one glance.
Particularly useful when there is a lot of entanglement of the EMA's
There is also dual Bollinger Bands & Donchian Channels that are available to check the volatility of that particular scrip, which will help you stay in the trade or exit based on your criteria.
Band-Pass FilterJust a clean script that can be applied on top of other indicators/sources or you can take the function out of the source and use it in other scripts.
The idea for this was taken from www.pinecoders.com except I am utilizing an EMA instead of SMA. Simply put, we are combining a low-pass filter (moving average) with a high-pass filter (smoothed difference between the source and moving average). The result is a filter/moving average that provides a great combination of minimizing noise while still reacting strongly to price and trend changes.
I like to use this filter in place of other MAs in Pine Scripts to smooth my data. So instead of doing something like sma(stochastic,5) I can easily plug in bp(stochastic,5). It works just fine for your primary moving averages against price as well.
KingEMA21-55ZoneI used the moving average with the habit of 21-55, so added two moving average
When the price runs above 55, it only looks for the buy signal.
When the price runs below 55, it only looks for sell signals.
The first step up through the 55 moving average after the first confirmation can buy homeoply,
The first pull down after crossing the 55 moving average for the first time confirms that it can be sold in line with the trend.
Price horizontal finishing, moving average frequently across the field observation.
The yellow area in the interval from 81to 55 is the homeopathic warehouse addition signal.
When the price is above the 55 moving average, the k-line closes below the 21-day moving average as a callback signal
Prices below the 55 ema close above the 21 - day ema as a rebound signal
After the correction and rebound signals come out, we should make half of the profit and the other half of the stop loss in the break-even place.
Moving average is very suitable for the trend of strong varieties, is not suitable for volatile market.
Only at the end of the shock market moving average upward or downward divergent when it is possible to be used.
1. Repeatedly entangle the mean line of horizontal disk stage and observe it from the field
2. Sell the three EMA moving averages when they can't exceed 89EMA with downward crossing
3, many times can not break the new low when prices go sideways profit
4. Buy when the price reaches 89EMA after the convergence of triangle 3 is broken
5, the Angle of price rise slowed and closed below the 21 moving average when profit
6. Left field observation during transverse oscillation.
Sit tight while news or data cause prices to fall quickly
8. Buy when the price triangle breaks through the 55 moving average upward
9, the price does not rise to slow down when the horizontal closed below the 21 moving average when profit
10, price horizontal shock finishing at the same time the average line also transverse finishing field observation
11, the price of the triangle after finishing through the 89 moving average to buy.At this point all the averages have turned up
12, the second time can not break through the new high when the negative line can profit
13, the price of the first time in the same period of time through 89 after the first step back can be re-bought.
中文翻译
价格在55上面运行时时只找买入信号、
价格在55下面运行时只寻找卖出信号、
第一次向上穿过55均线后的第一次回踩确认可以顺势买入、
第一次向下穿过55均线后的第一次回抽确认可以顺势卖出、
价格横盘整理,均线频繁穿越时离场观察。
21-55区间里面黄色区域为顺势加仓信号,
价格在55均线上面时K线收盘在21天均线下面时为回调信号
价格在55均线下面时K线收盘在21天均线上面时为反弹信号
在回调和反弹信号出来之后我们应该获利一半的头寸,另外一半止损放到盈亏平衡的地方。
均线非常适合趋势性很强的品种,并不适合震荡行情。
只有在震荡行情结束时均线向上或向下发散时才有被运用的可能。
1、横盘阶段均线反复纠缠,离场观察
2、三条EMA均线向下交叉回抽无法超越55EMA时卖出
3、多次不能破新低时价格走横时获利
4、价格在3处三角形收敛被突破后站上了55EMA时买入
5、价格上涨角度变缓并收盘在21均线下面时获利
6、横盘震荡时离场观察。
7、见死不救新闻或数据导致价格快速下跌时观望
8、价格三角形向上突破时穿过55均线时买入
9、价格不升减速走横时收盘于21均线下面时获利
10、价格横盘震荡整理同时均线也横向整理时离场观察
11、价格突破三角形整理后重新穿过89均线时买入。此时所有均线已经向上翘头
12、第二次不能突破新高时收阴线可以获利
13、价格在同一个时间周期内第一次穿过89以后的第一次回踩可以重新买入
14、21-55作为牛熊的分水岭。在21-55区域之下只考虑做空,21-55之上只考虑做多。如果21-55走横则以位置决定高位倾向空低位倾向多。
15、K线会因为指标的设置自动变成两个颜色块,绿色看涨,红色看跌。做趋势看K线颜色。牛市的红色可以当成入场K熊市绿色当成入场K
KingEMA21-55-89-144I used the moving average with the habit of 21-55, so added two moving average, one is the short line 8EMA, the other is the medium and long line 89ema
Explain the application of moving averages through the disk surface:
When the price runs above 89, it only looks for the buy signal.
When the price runs below 89, it only looks for sell signals.
The first step up through the 89 moving average after the first confirmation can buy homeoply,
The first pull down after crossing the 89 moving average for the first time confirms that it can be sold in line with the trend.
Price horizontal finishing, moving average frequently across the field observation.
The yellow area in the interval from 8 to 21 is the homeopathic warehouse addition signal.
When the price is above the 89 moving average, the k-line closes below the 21-day moving average as a callback signal
Prices below the 89 ema close above the 21 - day ema as a rebound signal
After the correction and rebound signals come out, we should make half of the profit and the other half of the stop loss in the break-even place.
Moving average is very suitable for the trend of strong varieties, is not suitable for volatile market.
Only at the end of the shock market moving average upward or downward divergent when it is possible to be used.
1. Repeatedly entangle the mean line of horizontal disk stage and observe it from the field
2. Sell the three EMA moving averages when they can't exceed 89EMA with downward crossing
3, many times can not break the new low when prices go sideways profit
4. Buy when the price reaches 89EMA after the convergence of triangle 3 is broken
5, the Angle of price rise slowed and closed below the 21 moving average when profit
6. Left field observation during transverse oscillation.
Sit tight while news or data cause prices to fall quickly
8. Buy when the price triangle breaks through the 89 moving average upward
9, the price does not rise to slow down when the horizontal closed below the 21 moving average when profit
10, price horizontal shock finishing at the same time the average line also transverse finishing field observation
11, the price of the triangle after finishing through the 89 moving average to buy.At this point all the averages have turned up
12, the second time can not break through the new high when the negative line can profit
13, the price of the first time in the same period of time through 89 after the first step back can be re-bought.
中文翻译
价格在89上面运行时时只找买入信号、
价格在89下面运行时只寻找卖出信号、
第一次向上穿过89均线后的第一次回踩确认可以顺势买入、
第一次向下穿过89均线后的第一次回抽确认可以顺势卖出、
价格横盘整理,均线频繁穿越时离场观察。
8-21区间里面黄色区域为顺势加仓信号,
价格在89均线上面时K线收盘在21天均线下面时为回调信号
价格在89均线下面时K线收盘在21天均线上面时为反弹信号
在回调和反弹信号出来之后我们应该获利一半的头寸,另外一半止损放到盈亏平衡的地方。
均线非常适合趋势性很强的品种,并不适合震荡行情。
只有在震荡行情结束时均线向上或向下发散时才有被运用的可能。
1、横盘阶段均线反复纠缠,离场观察
2、三条EMA均线向下交叉回抽无法超越89EMA时卖出
3、多次不能破新低时价格走横时获利
4、价格在3处三角形收敛被突破后站上了89EMA时买入
5、价格上涨角度变缓并收盘在21均线下面时获利
6、横盘震荡时离场观察。
7、见死不救新闻或数据导致价格快速下跌时观望
8、价格三角形向上突破时穿过89均线时买入
9、价格不升减速走横时收盘于21均线下面时获利
10、价格横盘震荡整理同时均线也横向整理时离场观察
11、价格突破三角形整理后重新穿过89均线时买入。此时所有均线已经向上翘头
12、第二次不能突破新高时收阴线可以获利
13、价格在同一个时间周期内第一次穿过89以后的第一次回踩可以重新买入
14、21-55作为牛熊的分水岭。在21-55区域之下只考虑做空,21-55之上只考虑做多。如果21-55走横则以位置决定高位倾向空低位倾向多。
15、K线会因为指标的设置自动变成两个颜色块,绿色看涨,红色看跌。做趋势看K线颜色。牛市的红色可以当成入场K熊市绿色当成入场K
KingEMA8-21-55-89I used the moving average with the habit of 21-55, so added two moving average, one is the short line 8EMA, the other is the medium and long line 89ema
Explain the application of moving averages through the disk surface:
When the price runs above 89, it only looks for the buy signal.
When the price runs below 89, it only looks for sell signals.
The first step up through the 89 moving average after the first confirmation can buy homeoply,
The first pull down after crossing the 89 moving average for the first time confirms that it can be sold in line with the trend.
Price horizontal finishing, moving average frequently across the field observation.
The yellow area in the interval from 8 to 21 is the homeopathic warehouse addition signal.
When the price is above the 89 moving average, the k-line closes below the 21-day moving average as a callback signal
Prices below the 89 ema close above the 21 - day ema as a rebound signal
After the correction and rebound signals come out, we should make half of the profit and the other half of the stop loss in the break-even place.
Moving average is very suitable for the trend of strong varieties, is not suitable for volatile market.
Only at the end of the shock market moving average upward or downward divergent when it is possible to be used.
1. Repeatedly entangle the mean line of horizontal disk stage and observe it from the field
2. Sell the three EMA moving averages when they can't exceed 89EMA with downward crossing
3, many times can not break the new low when prices go sideways profit
4. Buy when the price reaches 89EMA after the convergence of triangle 3 is broken
5, the Angle of price rise slowed and closed below the 21 moving average when profit
6. Left field observation during transverse oscillation.
Sit tight while news or data cause prices to fall quickly
8. Buy when the price triangle breaks through the 89 moving average upward
9, the price does not rise to slow down when the horizontal closed below the 21 moving average when profit
10, price horizontal shock finishing at the same time the average line also transverse finishing field observation
11, the price of the triangle after finishing through the 89 moving average to buy.At this point all the averages have turned up
12, the second time can not break through the new high when the negative line can profit
13, the price of the first time in the same period of time through 89 after the first step back can be re-bought.
中文翻译
价格在89上面运行时时只找买入信号、
价格在89下面运行时只寻找卖出信号、
第一次向上穿过89均线后的第一次回踩确认可以顺势买入、
第一次向下穿过89均线后的第一次回抽确认可以顺势卖出、
价格横盘整理,均线频繁穿越时离场观察。
8-21区间里面黄色区域为顺势加仓信号,
价格在89均线上面时K线收盘在21天均线下面时为回调信号
价格在89均线下面时K线收盘在21天均线上面时为反弹信号
在回调和反弹信号出来之后我们应该获利一半的头寸,另外一半止损放到盈亏平衡的地方。
均线非常适合趋势性很强的品种,并不适合震荡行情。
只有在震荡行情结束时均线向上或向下发散时才有被运用的可能。
1、横盘阶段均线反复纠缠,离场观察
2、三条EMA均线向下交叉回抽无法超越89EMA时卖出
3、多次不能破新低时价格走横时获利
4、价格在3处三角形收敛被突破后站上了89EMA时买入
5、价格上涨角度变缓并收盘在21均线下面时获利
6、横盘震荡时离场观察。
7、见死不救新闻或数据导致价格快速下跌时观望
8、价格三角形向上突破时穿过89均线时买入
9、价格不升减速走横时收盘于21均线下面时获利
10、价格横盘震荡整理同时均线也横向整理时离场观察
11、价格突破三角形整理后重新穿过89均线时买入。此时所有均线已经向上翘头
12、第二次不能突破新高时收阴线可以获利
13、价格在同一个时间周期内第一次穿过89以后的第一次回踩可以重新买入
14、21-55作为牛熊的分水岭。在21-55区域之下只考虑做空,21-55之上只考虑做多。如果21-55走横则以位置决定高位倾向空低位倾向多。
15、K线会因为指标的设置自动变成两个颜色块,绿色看涨,红色看跌。做趋势看K线颜色。牛市的红色可以当成入场K熊市绿色当成入场K
2-Year MA MultiplierThis script improves on the basic moving average multiplier script by adding inputs for the multiplier and moving average type.
Price Action Movements by RPThis is the Indicator which will enhance finding Buying and Selling opportunity on any market.
Mostly suited for day Trading and some indicator can be used for signalling stock on longer time frame.
Indicators used to create this strategy is as follows:
- Exponential Moving Average (EMA)
- Supertrend
- Volume Weighted Average Price (VWAP)
- Exponential Moving Average of Volume Weighted Average Price (MVWAP)
- Previous Day Volume Weighted Average Price (PVWAP)
- Previous Day High, Low and Close (PDH, PDL, PDC)
- And Current Day Support and Resistance points based on Previous day Price Movement.
This will indicate where to buy and Sell with Indicator based on Following criteria,
Buy Signal given,
- When Close is above Exponential Moving Average 9
- When Close is above Exponential Moving Average 21
- RSI above 55
- Supertrend is positive
- Volume is above 300 moving Average
- Close is above Volume Weighted Average Price
Sell Signal given,
- When Close is below Exponential Moving Average 9
- When Close is below Exponential Moving Average 21
- RSI below 45
- Supertrend is negative
- Volume is above 300 moving Average
- Close is below Volume Weighted Average Price
Trades can use this Study according to their need of the Indicator.
Users can Tick the indicator which they want to add on Charts to study.
Only Exponential Moving Average indicator can be used.
Only Supertrend can be used.
Volume Weighted Average Price, Previous Day Volume Weighted Average Price, Exponential Moving Average of Volume Weighted Average Price and Previous Day High, Low and Close can be used as a particular study.
Support and Resistance can be used along with Previous Day High and Previous Day Low as a particular study.
This is multipurpose Study which will help Trading Society immensely.
Thank You.
NNFX Baseline ToolNNFX All-in-One Baseline display / test tool.
This is usefull (hopefully) for the NNFX way of trading only. It's not intended to be used as a standalone tool.
Basically, this script displays and tests many types of Moving Averages as baselines.
It displays baseline signals, based on the NNFX ATR-related rule for baseline entries.
It can be used as a backtest tool, or plugged into the whole nnfx algo.
If signal display option is enabled, signals are displayed on chart : green for long, red for short, orange for crossovers beyond the ATR channel :
Many baselines available : SMA , EMA , WMA , VWMA , ALMA , AMA, SMMA , DEMA , FRAMA , HULL, KAMA , KIJUN, JURIK, LAGUERRE, MCGINLEY , TMA1, TMA2, VIDYA , MODULAR FILTER, VAMA , ZLEMA , T3, LSMA, etc.
Additional options :
- multiplying the ATR channel (and subsequent rule) by a factor (default = 1)
- plot the ATR channel (def = yes)
- fill it (def = yes)
- display signals (def = yes)
- option for add color to the baseline, for long/short territory (2 different options : baseline is colored, background is colored)
- darkmode / lightmode color option. (def = dark)
We also display panels, with general information and some test results. Tests are done within the test period.
I tried to test all the different MAs included in the script but some bugs might still be present, so use it at ur own risk.
If you'd like a new MA option added, please let me know in comments.
I included a "bad" signal detection, it can help for tweaking the settings. Signals are defined as "bad" when they are immediately followed by another signal.
When there is 2 or more bad signals next to another, you spotted a chopiness zone (a chopiness zone is defined as a zone where BL get eaten alive).
Example :
to do :
- plug it with the c1/c2 backtest tool (it's the whole point)
- add alerts,
- add more ma types
- stop to use the operator, it's not convenient at all
- add wr% calculation as a standalone feature (with TP / SL)
- add a way to measure chopiness in the test (dont know how yet)
- detect & display chopiness zones
I asked other users when I used their ideas (for some particular types of MAs). They all agreed.
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...
Stop-Loss order according to Average PenetrationAs a engineer, the view of signal and noise in the book of "Trading for a living"really interests me. For a trader the biggest issue is when should we enter and exit the market. The view of safety range stop loss may help to solve this problem for some beginner and give you a new idea of stoploss for you trade system
Here is the content from Trading for a Living
you may use the slope of a 22-day EMA to define the trend. You need to choose the length of the lookback period for measuring noise level. it has to be long enough to track recent behavior but short enough to be relevant for current trading. A period of 10 to 20 days works well, or we can make our lookback period 100 days or so if we want to average long-term market
if the trend is up, mark all downside penetrations during the look-back period, add their depths, and divide the sum by the number of penetrations。 This gives you the Average Downside Penetration for the selected look back
if today's low is lower than yesterday's, do not move your stop lower since we are only allowed to raise stops on long positions, not lower them
Reverse these rules in downtrends. When a 22-day EMA identifies a downtrend, count all the upside penetrations during the look-back period and find the Average Upside Penetration. Multiply it by a coefficient, starting with two. When you go short, place a stop twice he Average Upside Penetration above the previous day's high. Lower your stop whenever the market makes a lower high, but never raise it.
The important thing when you make an order is to hold your earning during a trending scenario. To avoid stopping loss by the variance in the market and to avoid big loss if the market shift to another direction in a short time.
From the graph there, I select the most recent trend up period in the Bitcoin and adjust the parameters according to this trend.
As you can see, the stop loss is away from the lowest price in bar, so that you will not be forced to exit the trade by small turbulence. You can hold your order and need to worry about missing the trend. But there are always sharp plunges in the uptrend. you can see two cursors on the graphic. The stop loss will help you avoid this plunge.
But in my opinion, this will be the hard stop loss in your trade. Help you to keep profit and avoid big loss. To maximize the profit, you had better to build you own strategy.
When I try to create this indicator, it is found that two rule for this indicator
1. you had better to use it in a clear trend range. Since the stop loss can only be higher in a long condition and lower in a short condition. If you use it in a volatile market., then stop loss doesn’t make any senses.
2. you need to adjust those parameters according to the market and the trend you are in. Some people like to avoid big loss, you can set them this depending on you experience
Last, this is getting from the view in the book, i didn’t do any back test for it. So please be careful to use it and let me know if you have any suggestions or ideas.
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 )
Bull vs Bear Power by DGTElder-Ray Bear and Bull Power
Dr. Alexander Elder cleverly named his first indicator Elder-Ray because of its function, which is designed to see through the market like an X-ray machine. Developed in 1989, the Elder-Ray indicator can be applied to the chart of any security and helps traders determine the strength of competing groups of bulls and bears by gazing under the surface of the markets for data that may not immediately be ascertainable from a superficial glance at prices
The Elder-Ray indicator is comprised by three elements – Bear Power, Bull Power and a 13-period Exponential Moving Average.
As the high price of any candle shows the maximum power of buyers and the low price of any candle shows the maximum power of sellers, Elder uses the 13-period EMA in order to present the average consensus of price value. Bull power shows whether buyers are capable of pushing prices above the average consensus of value. Bear power shows whether sellers are capable of pushing prices below the average consensus of value. Mathematically, Bull power is the result of subtracting the 13-period EMA from the high price of the day, and Bear power is the result of subtracting the 13-period EMA from the low price of the day.
What does this study implements
Attempts to customize interpretation of Alexander Elder's Elder-Ray Indicator (Bull and Bear Power) by
• adding additional insights to support/confirm Elder’s strategy with different indicators related with the Elder’s concept
• providing different options of visualization of the indicator
• providing smoothing capability
Other Indicators to support/confirm Elder-Ray Indicator:
Colored Directional Movement Index (CDMI) , a custom interpretation of J. Welles Wilder’s Directional Movement Index (DMI) , where :
DMI is a collection of three separate indicators ( ADX , +DI , -DI ) combined into one and measures the trend’s strength as well as its direction
CDMI is a custom interpretation of DMI which presents ( ADX , +DI , -DI ) with a color scale - representing the trend’s strength, color density - representing momentum/slope of the trend’s strength, and triangle up/down shapes - representing the trend’s direction. CDMI provides all the information in a single line with colored triangle shapes plotted on the top. DMI can provide quality information and even trading signals but it is not an easy indicator to master, whereus CDMI simplifies its usage.
Alexander Elder considers the slope of the EMA, which gives insight into the recent trend whether is up or down, and CDMI adds additional insight of verifying/confirming the trend as well as its strength
Note : educational content of how to read CDMI can be found in ideas section named as “Colored Directional Movement Index”
different usages of CDMI can be observed with studies “Candlestick Patterns in Context by DGT", “Ichimoku Colored SuperTrend + Colored DMI by DGT”, “Colored Directional Movement and Bollinger Band's Cloud by DGT”, and “Technical Analyst by DGT”
Price Convergence/Divergence , if we pay attention to mathematical formulations of bull power, bear power and price convergence/divergence (also can be expressed as price distance to its ma) we would clearly observe that price convergence/divergence is in fact the result of how the market performed based on the fact that we assume 13-period EMA is consensus of price value. Then, we may assume that the price convergence/divergence crosses of bull power, or bear power, or sum of bull and bear power could be considered as potential trading signals
Additionally, price convergence/divergence visualizes the belief that prices high above the moving average or low below it are likely to be remedied in the future by a reverse price movement
Alternatively, Least Squares Moving Average of Price Convergence/Divergence (also known as Linear Regression Curve) can be plotted instead of Price Convergence/Divergence which can be considered as a smoothed version of Price Convergence/Divergence
Note : different usages of Price Convergence/Divergence can be observed with studies “Trading Psychology - Fear & Greed Index by DGT”, “Price Distance to its MA by DGT”, “P-MACD by DGT”, where “Price Distance to its MA by DGT” can also be considered as educational content which includes an article of a research carried on the topic
Options of Visualization
Bull and Bear Power plotted as two separate
• histograms
• lines
• bands
Sum of Bull and Bear Power plotted as single
• histogram
• line
• band
Others
Price Convergence/Divergence displayed as Line
CDMI is displayed as single colored line of triangle shapes, where triangle shapes displays direction of the trend (triangle up represents bull and triangle down represent bear), colors of CDMI displays the strength of the trend (green – strong bullish, red – strong bearish, gray – no trend, yellow – week trend)
In general with this study, color densities also have a meaning and aims to displays if the value of the indicator is falling or growing, darker colors displays more intense move comparing to light one
Note : band's upper and lower levels are calculated by using standard deviation build-in function with multiply factor of 0.236 Fibonacci’s ratio (just a number for our case, no any meaning)
Smoothing
No smoothing is applied by default but the capability is added in case Price Convergence/Divergence Line is assumed to be used as a signal line it will be worth smoothing the bear, bull or sum of bear and bull power indicators
Interpreting Elder-Ray Indicator, according to Dr. Alexander Elder
Bull Power should remain positive in normal circumstances, while Bear Power should remain negative in normal circumstances. In case the Bull Power indicator enters into negative territory, this implies that sellers have overcome buyers and control the market. In case the Bear Power indicator enters into positive territory, this indicates that buyers have overcome sellers and control the market. A trader should not go long at times when the Bear Power indicator is positive and he/she should not go short at times when the Bull Power indicator is negative.
13-period EMAs slope can be used in order to identify the direction of the major trend. According to Elder, the most reliable buy signals are generated, when there is a bullish divergence between the Bear Power indicator and the price (Bear Power forms higher lows, while the market forms lower lows). The most reliable sell signals are generated, when there is a bearish divergence between the Bull Power indicator and the price (Bull Power forms lower highs, while the market forms higher highs).
There are four basic conditions, required to go long or short, with the use of the Elder-Ray method alone.
In order to go long:
1. The market is in a bull trend, as indicated by the 13-period EMA
2. Bear Power is in negative territory, but increasing
3. The most recent Bull Power top is higher than its prior top
4. Bear Power is going up from a bullish divergence
The last two conditions are optional that fine-tune the buying decision
In order to go short:
1. The market is in a bear trend, as indicated by the 13-period EMA
2. Bull Power is in positive territory, but falling
3. The most recent Bear Power bottom is lower than its prior bottom
4. Bull Power is falling from a bearish divergence
The last two conditions are optional, they provide a stronger signal for shorting but they are not absolutely essential
If a trader is willing to add to his/her position, he/she needs to:
1. add to his/her long position, when the Bear Power falls below zero and then climbs back into positive territory
2. add to his/her short position, when the Bull Power increases above zero and then drops back into negative territory.
note : terminology of the definitions used herein are as per TV dictionary
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
Disclaimer : The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
MACD VWAP IndicatorThis indicator uses a combination of the VWAP, EMA 9 and parts of the MACD in order to detect a bullish or bearish trend.
How to trade it:
Set SL either below or above the VWAP line (orange) and TP to 1:1.5 ratio (depending on last few candles, of course).
If EMA200 is close by then place SL either below or above EMA200 (blue) and TP to 1:1.5 ratio
Important:
Best traded in 15M, 30M => Intraday.
Have fun! :)
Up/Down Trend MarkerA simple indicator of trend by using 3 EMAs of multiplies of 2, 5 and 10, filtered by standard positive/negative directional movements (DM) which are the base of Average Directional Index (ADX).
The "Trend Strength" option is included to set the EMA multipliers and also the variation between DM+ and DM- which interpret the trend as a weak or a strong one.
Note that the markers only point to almost the beginning of the trends and just change the direction when the opposite trend is detected.
Feel free to send me your opinions.
MACD Crossover Trend IndicatorThis is a very simple " the trend is your friend " indicator - if you are consistent!
How this indicator works:
This indicator detects MACD Crossovers based on the current trend. It checks wether the current close price is above or below the 200 EMA and therefore decides whether we are in an up- or down trend.
UP-TREND: If the price is above the EMA200, the MACD is below 0 and crosses up the signal line, then this is a BUY signal!
DOWN-TREND: If the price is below the EMA200, MACD is above 0 and crosses down the signal line, then this is a SELL signal!
You can also add an alert, that keeps you informed, once one of these scenario happens for a certain pair!
With this indicator you will never enter against the trend.
Have fun! :)
EMA with time-interval dependant visiblity settingThis scrip exposes 4 Exponential Moving Average (EMA) indicators which their visibility can be set to a daily or weekly time-frame (aka intervals). Based on your current chart time-frame, the matching EMA indicators come on and off.
This helps to have meaningful EMAs relevant to your time internal.
In a traditional 10 EMA indicates a plotted indicator would bear a meaning of a 10 day EMA when in daily and 10 week EMA when in weekly chart which may or may not be useful as some who for example only require a 10 week EMA for thier analysis and wouldn't want to cloud a daily chart with an EMA which won't resemble a valuable output for this particular user.
With EMA+, you can choose to see the 10 week EMA only when your chart is in the weekly time interval, so when switched to a daily interval a 10x EMA is not shown anymore.
If you prefer to see a 10 week EMA and a 21 day EMA on the other hand, you will only have 1 EMA shown when in weekly mode which is a 10 week EMA and one EMA when in daily mode with is 21 day EMA.