MACD PlusMoving Average Convergence Divergence – MACD
The MACD is an extremely popular indicator used in technical analysis. It can be used to identify aspects of a security's overall trend. Most notably these aspects are momentum, as well as trend direction and duration. What makes the MACD so informative is that it is actually the combination of two different types of indicators. First, the MACD employs two Moving Averages of varying lengths (which are lagging indicators) to identify trend direction and duration. Then, it 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.
Added Color Plots to Settings Pane.
Switched MTF Logic to turn ON/OFF automatically w/ TradingView's Built in Feature.
Added Ability to Turn ON/OFF Show MacD & Signal Line.
Added Ability to Turn ON/OFF Show Histogram.
Added Ability to Change MACD Line Colors Based on Trend.
Added Ability to Highlight Price Bars Based on Trend.
Added Alerts to Settings Pane.
Customized Alerts to Show Symbol, TimeFrame, Closing Price, MACD Crosses Up & MACD Crosses Down Signals in Alert.
Alerts are Pre-Set to only Alert on Bar Close.
Added ability to show Dots when MACD Crosses.
Added Ability to Change Plot Widths in Settings Pane.
Added in Alert Feature where Cross Up if above 0 or cross down if below 0 (OFF By Default).
Squeeze Pro
Traditionally, John Carter's version uses 20 period SMAs as the basis lines on both the BB and the KC.
In this version, I've given the freedom to change this and try out different types of moving averages.
The original squeeze indicator had only one Squeeze setting, though this new one has three.
The gray dot Squeeze, call it a "low squeeze" or an "early squeeze" - this is the easiest Squeeze to form based on its settings.
The orange dot Squeeze is the original from the first Squeeze indicator.
And finally, the yellow dot squeeze, call it a "high squeeze" or "power squeeze" - is the most difficult to form and suggests price is under extreme levels of compression.
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 bottom. DMI can provide quality information and even trading signals but it is not an easy indicator to master, whereus CDMI simplifies its usage. The CDMI adds additional insight of verifying/confirming the trend as well as its strength
Label :
Displaying the trend strength and direction
Displaying adx and di+/di- values
Displaying adx's momentum (growing or falling)
Where tooltip label describes "howto read colored dmi line"
Ability to display historical values of DMI readings displayed in the label.
Added "Expert Trend Locator - XTL"
The XTL was developed by Tom Joseph (in his book Applying Technical Analysis ) to identify major trends, similar to Elliott Wave 3 type swings.
Blue bars are bullish and indicate a potential upwards impulse.
Red bars are bearish and indicate a potential downwards impulse.
White bars indicate no trend is detected at the moment.
Added "Williams Vix Fix" signal. The Vix is one of the most reliable indicators in history for finding market bottoms. The Williams Vix Fix is simply a code from Larry Williams creating almost identical results for creating the same ability the Vix has to all assets.
The VIX has always been much better at signaling bottoms than tops. Simple reason is when market falls retail traders panic and increase volatility , and professionals come in and capitalize on the situation. At market tops there is no one panicking... just liquidity drying up.
The FE green triangles are "Filtered Entries"
The AE green triangles are "Aggressive Filtered Entries"
Macdcross
CM MACD Custom Indicator - Multiple Time Frame - V2***For a Detailed Video Overview Showing all of the Settings...
Click HERE to View Video
New _CM_MacD_Ult_MTF _V2 Update 07-28-2021
Thanks to @SKTennis for help in Updating code to V2
Added Groups to Settings Pane.
Added Color Plots to Settings Pane
Switched MTF Logic to turn ON/OFF automatically w/ TradingView's Built in Feature
Updated Color Transparency plots to work in future update
Added Ability to Turn ON/OFF Show MacD & Signal Line
Added Ability to Turn ON/OFF Show Histogram
Added Ability to Change MACD Line Colors Based on Trend
Added Ability to Highlight Price Bars Based on Trend
Added Alerts to Settings Pane.
Customized how Alerts work. Must keep Checked in Settings Pane, and When you go to Alerts Panel, Change Symbol to Indicator (CM_Ult_MacD_MTF_V2)
Customized Alerts to Show Symbol, TimeFrame, Closing Price, MACD Crosses Up & MACD Crosses Down Signals in Alert
Alerts are Pre-Set to only Alert on Bar Close
See Video for Detailed Overview
New Updates Coming Soon!!!
***Please Post Feedback and Any Feature Requests in the Comments Section Below***
MACD, RSI, & RVOL Strategy
This strategy combines the use of MACD (12, 26, 9), RSI (14, 30, 70), and RVOL (14) to create Long Buy and Sell signals. This works well with many different time intervals but was developed with 15-minute intervals in mind.
Using MACD as a reference, the strategy identifies when the MACD line crosses over (a factor in a buy signal) and under (a factor in a Sell signal) the Signal line. This shows a shift in positive (cross over) and negative (cross under) of a security.
Using the Relative Strength Index ( RSI ) as an indicator, the strategy notices when the velocity and magnitude of the directional price movements cross over the Oversold signal (30) and crosses under the Overbought signal (70) as a factor in creating a Buy and Sell signal.
Using Relative Volume (RVOL) as an indicator, the strategy calculates when the current volume has crossed over the 2x average volume indicator over a given period and is then used as a factor in creating a Buy signal. RVOL is also used when the change in volume crosses under a set RVOL number (in this strategy, it is set to a RVOL of 5).
RVOL = Current Volume / Average Volume over a certain period
This strategy indicates a Buy signal when 2/3 conditions are met:
- RSI Cross Over the Over Sold signal (default 30)
- MACD Cross Over of Signal ( MACD > Signal)
- RVOL Cross Over of 2 (RVOL > 2)
This strategy indicates a Sell signal when 2/3 conditions are met:
- RSI Cross Under the Over Bought signal (default 70)
- MACD Cross Under of Signal ( MACD < Signal)
- RVOL Cross Under 5 (RVOL < 5)
Enjoy and leave feedback!
MACD Moving Average Convergence/Divergence - DurbtradeDurbtrade MACD - macd line changes color based on vertical direction. This makes it easier to see and discern movements and also helps the indicator to retain maximum functionality when taking up less chart real estate (also, having the color change really helps me see charts on small screens... such as when it's bright outside and I'm driving in my car and glancing at a chart on my phone... it helps having the info pop visually). A fill option is included to fill the space between the macd and signal lines, though I personally prefer to disable this function. Also, you get a zero line if you want it, and it doesn't extend past the current time, removing unnecessary info and keeping your chart looking a bit cleaner. Finally, there are color-coded, cross-over and cross-under background fills, signaling when the macd line crosses the signal line.
This is my 2nd published script, and 2nd script ever. If you like this style, see my 1st published script: Durbtrade Bollinger Bands Width.
Hope you find this useful.
Feel free to comment.
Awesome Oscillator & MACD Cross TacticOscillator for Tradingview based on MACD and Awesome Oscillator. This oscillator is designed to identify potential local growth or decline in prices as part of a trend movement.
For some ridiculous reason I am not allowed to attach screenshots of graphs and links on TradingView, so I hope that you will find my detailed instructions on my github page: github.com/samgozman/AO-MACD-cross-tradingview
EMA Cross and MACD Signal CombinedThe rule is simple.
When MACD crosses up, it is supposed to give a buy signal. However, before entering into a Long position, there is a need for a confirmation. This confirmation can be from a down trendline breakout or from another indicator.
In this case, I've chosen the Exponential Moving Average Cross to be as the confirmation.
The Buy Signal will appear when there it fulfills the following conditions:-
i. The MACD line is above the Signal Line
ii. The fast EMA crosses the Slow EMA
The Sell signal will appears when the opposite of the above condition is met.
This indicator is meant for the Swing Trader whom would like to hold a position for a long time.
CT Reverse MACD CrossIntroducing the Reverse MACD Cross
MACD.... short for moving average convergence/divergence, is a trading indicator used in technical analysis of stock prices, created by Gerald Appel in the late 1970s.
It is designed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.
Prior work by Johny Dough showed how we can compute the price level required to make the MACD stay at its current level,
and also how to compute the price level required for the MACD to cross the zero line.
I have brought that idea to it logical conclusion for the MACD by creating a new function which also computes the price level required to cross the MACD with its signal line.
This allows the user to quickly see all of the most relevant information from the MACD and the actual price levels where the indicator will change its posture.
The MACD indicator (or "oscillator") is a collection of three time series calculated from historical price data, most often the closing price.
These three series are:
the MACD series proper shown here in blue
the "Signal Line" or "average" series shown here in red
the "Divergence" series which is the difference between the two shown here as a histogram.
There is also usually a baseline set at zero.
The MACD series is the difference between a "fast" (short period) exponential moving average (EMA), and a "slow" (longer period) EMA of the price series.
The average series (signal line) is an EMA of the MACD series itself.
The MACD indicator thus depends on three parameters, namely the time periods of the three EMAs.
The notation "MACD ( a, b, c )" usually denotes the standard indicator where the MACD series is the difference of EMAs with characteristic times a and b, and the average series is an EMA of the MACD series with characteristic time c.
There is an infobox which displays...
Whether the MACD is falling or rising
the price level which will make the MACD to change from rising to falling or vice versa
the price level which will cause the MACD to cross the signal line
the price level which will cause the MACD to cross the zero line
The most commonly used values are 12 for the fast, 26 for the slow, and 9 for the signal line, that is, MACD ( 12, 26, 9 ) .
The MACD and average series are customarily displayed as continuous lines in a plot whose horizontal axis is time oscillating above and below a zero line, whereas the divergence is commonly shown as a bar graph / histogram.
A fast EMA responds more quickly than a slow EMA to recent changes in a stock's price.
By comparing EMAs of different periods, the MACD series can indicate changes in the trend of a stock.
It is claimed that the divergence series can reveal subtle shifts in the stock's trend.
Since the MACD is based on moving averages, it is a lagging indicator. As a future metric of price trends, the MACD is less useful for stocks that are not trending (trading in a range) or are trading with unpredictable price action.
[blackcat] L1 Improved MACD IndicatorLevel: 1
Background
The MACD is a superior derivative of moving average crossovers and was developed by Gerald Appel in 1979 as a market timing tool. MACD uses two exponential moving averages with different bar periods, which are then subtracted to form what Mr. Appel calls the Fast Line. A 9-period moving average of the fast line creates the slow line.
Function
L1 Improved MACD Indicator mainly improves MACD histogram by customized an algorithm and add three levels of long entry alerts derived from ema().
Key Signal
buy1 --> the 1st level of buy alert in green
buy2 --> the 2nd level of buy alert in lime
buy3 --> the 3rd level of buy alert in yellow
diff --> classic MACD diff fast line in white
dea --> classic MACD dea slow line in yellow
macd --> classic difference histogram,but I did not use it directly in the plot.
Pros and Cons
Pros:
1. more clear sub level trend change with new histograms
2. three levels of buy alerts
Cons:
1. need sophisticated knowledge of MACD to use this well
2. this still requires a lot of MACD experience to obtain reliable trading signals
Remarks
I am a fan of MACD. Even the most classic MACD can have in-depth usage. I think MACD is the king of indicators.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
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
[SCL] MACD DoubleCrossCounts crosses of the MACD and signal lines and derives entry signals. The code for counting the crosses, for deciding what counts as "close enough", and for auto-adjusting for resolutions 1D or longer, might be useful for Pinescripters. The entries and exits themselves are not intended to be used on their own, but could be used as confluence within a trading system. Full explanation is in the script introduction.
MACD_trendtraderThis is my modified macd indicator. It uses moving averages to determine the trend of the market. It is best used on lower time frames such as 5min and 15min. I found it useful especially with Forex pairs and also traditional markets.
This indicator will help you get in at a pullback in a trending market.
RED background tells you the trend is down. A possible entry happens when you get a sell signal from the macd oscillator above the 0 line.
GREEN background tells you the trend is up. A possible entry happens when you get a buy signal from the macd oscillator below the 0 line.
a couple of examples:
Leave your feedback in the comments. Enjoy:)
MACD crossover while RSI Oversold/OverboughtThis indicator draws signals on the chart when a Bullish MACD Crossover occurs at the same time RSI is "oversold", and also when Bearish MACD Crossover occurs at the same time RSI is "overbought"
Indicators are drawn on the chart in the following scenarios:
1. Bullish signal
a. MACD bullish crossover occurs on a single bar
b. RSI was below the Oversold threshold (29 by default) within the prior 5 bars
2. Bearish signal
a. MACD bearish crossover occurs on a singnle bar
b. RSI was above the Overbought threshold (71 by default) within the prior 5 bars
Customizable MACD (how to detect a strong convergence)Helloooo traders
I wondered once if a MACD was based on an EMA/EMA/SMA or SMA/SMA/EMA (or WHATEVA/WHATEVA/WHATEVA).
Seems they're so many alternatives out there.
I decided to empower my audience more by choosing the type of moving averages you want for your MACD.
More options doesn't always mean better performance - but who knows - some might find a config that they like with it for their favorite asset/timeframe.
I added also a multi-timeframe component because I'm a nice guy ^^
Convergence is my BEST friend
An oscillator (like MACD) is to measure how strong a momentum is - generally, traders use those indicators to confirm a trend.
So understand that a MACD (or any other indicator not based on convergence ) won't likely be sufficient for doing great on the market.
Combined with your favorite indicator, however, you may get great results.
My indicators fav cocktail is mixing :
1) an oscillator (momentum confirmation)
2) a trendline/key level break (momentum confirmation)
3) adding-up on a different trading method but still converging with the first entry.
The reason I'm deep with convergence detection is because I'm obsessed with removing those fakeout signals. You know which ones I'm talking about :)
Those trades when the market goes sideways but our capital goes South (pun 100% intended) - 2 days later, the price hasn't changed much but some lost some capital due to fees, being overexposed, buying the top/selling the bottom of a range they didn't identify.
It's publicly known that ranges are the worst traders' enemy. It's boring, not fun, and .... end up moving in the direction we expected when we go to sleep or outside.
NO ONE/BROKER/EX-GF is tracking your computer - I checked also for mine as it happened for me way too often in the past.
I surely preferred blaming a few external unknown conditions than improving my TA back in the days #bad #dave
But my backtest sir...
Our backtests show what they're being told to show . A backtest without a stop-loss/hard exit logic will show incredible results.
Then trying that backtest with live trading is like in the Matrix movie - discovering the real world is tough and we must choose between the blue pill (learning how to evaluate properly risk/opportunity caught) and the red pill (increasing the position sizing, not setting a stop loss, holding the positions hoping for the best)
Last few words
Convergences aren't invented because it's cool to mix indicators with others. (it is actually and even fun)
They're created to remove most of the fakeouts . For those that can't be removed - a strong risk management would cut most of the remaining potential big losses.
No system works 100% of the time - so a convergence system needs a back-up plan in case the converged signal is wrong (could be stop-loss, hard exit, reducing position sizing, ...)
Wishing you the BEST and happy beginning of your week
Daveatt
MT4 MACD This is a plain macd similar to the one on the mt4
There are extra colors added for visuals
Primarily requested by user Sonja.
macd // signalline // macdmt4 // mt4macd
Presets Selector - FRIDAY NIGHT CHALLENGEBonjour/Salut ça va?
Ok enough for the french :) You guys should really stop challenging me on things on Pinescript and asking me if it's possible or not because... that's the second time in a row I'm about to reveal a nice trick
Please take this example as a proof of concept/feasability. This follower said "I'm tired of manually filling the fields of my indicator, my fingers are dead.... every time I change something in the code, I lose the configuration by default"
Say no more sir.... challenge accep..... wait for it ....ted (that's his real name actually) !!!!
Mesdames et messieurs (damn... my french accent is back), let's unveil the curtain on... the PRESETS SELECTOR (please try to imagine someone super famous shouting it and everyone standing and clapping their hands...)
What I mean by presets is THIS
I inspired myself from this script MacD-Custom-Indicator-Multiple-Time-Frame-All-Available-Options/ (this guy has more likes in a single indicator than me and my friends and my family in all social media channels combined over the past 15 years or so....#humbled)
Anywoo.... the concept is that you can define presets in your script .... which is not possible by TradingView at the moment. If you always have the same set of parameters for a given indicator, please think about your fingers too and give them some rest by implementing a preset in the code directly
I also added a few features :
- You can choose the resolution of the indicator (from 1 minute to 1 month)
- You can choose also between displaying a MACD or a MACD ZERO LAG
Imagine now you have a super complex backtest with hundreds of fields... and unfortunately ... you'll have to fill some of them for each of your tests. Might change in the future if TradingView will add the feature though :)
PS
I'm writing the Algorithm Builder documentation this weekend and the website should open in 3 weeks maximum. I think it's one of the most beautiful trading websites I've seen ever (I didn't do it, my friend did but who cares... it's mine :p)
PS2
I didn't post yesterday the script of the day so I'll post it tomorrow. What is due is due and I won't fail my challenge even ONCE !!!! ("But you just did yesterday bro...")
Have a great weekend
Dave
____________________________________________________________
Be sure to hit the thumbs up
- If you want to suggest some indicators that I can develop and share with the community, please use my personal TRELLO board
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
MACD Profit CandlesThis tool is simple yet very effective. It creates new candles on the chart based on the MACD.
Candles are green when MACD is increasing and red when it is decreasing. All lengths can be adjusted in the input menu and there is an option to plot the signal line.
The rules for using it are pretty simple:
1.Buy on Green
2.Sell on red
~Happy Trading~
MACD/EMA Long StrategyThis incredibly simple strategy uses a combination of the 20 EMA and bullish/bearish MACD crosses as a low risk method of getting in and out of markets.
Depending on whether the market is above or below the 200 SMA, the script determines if the market is in bullish or bearish territory. Above the 200 SMA, the script will ignore the 20 EMA as a buy condition and buy solely on the confirmation of a bullish MACD cross upon the close of a candle. In this bullish market, the script will only enable the sell condition if both the MACD is bearish AND a close below the 20 EMA occurs. This is to reduce the chances of the script selling prematurely in the event of a bearish MACD cross, if the market is still in overall bullish territory.
When the market is below the 200 SMA, the confirmation occurs in the opposite direction. The buy condition will only be met if both the MACD is bullish AND a close above the 20 EMA occurs. However, the sell condition ignores the 20 EMA and will sell solely on the confirmation of a bearish MACD cross upon the close of the candle.
This strategy can be used in both bullish and bearish markets. This conservative strategy will slightly underperform in a bull market, with the sell condition occasionally being met and then potentially buying back higher. However, it will successfully get you out of a turning market and automatically switch into a more 'risk-off' mentality during a bear market. This strategy is not recommended for sideways markets, as trading around the 20 EMA coupled with a relatively flat MACD profile can cause the strategy to buy the peaks and sell troughs easily.
MACD_Long_OnlyI created this indicator to calculate the gains that can be made purely by going long on the market. For exchanges without the ability to short, the standard MACD strategy is unable to accurately calculate the profit/loss from entering and exiting a position, as it includes profit/loss from actively shorting the market, which may either not be possible, or be undesirable for a specific asset.
Didi IndexThis indicator was originally developed by brazilian technical analyst Odir "Didi" Aguiar. Also known as "Didi Needles". Consider it as a brazilian MACD.
And don't forget to like)
VW-MACDHello traders!
I am reading "Investing with Volume Analysis: Identify, Follow, and Profit from Trends" by Buff Pelz Dormeier so I am going to implement all indicators that are considered there.
VW-MACD was developed by Buff Pelz Dormeier in 2000 and is based on the difference between a short-term volume-weighted moving average and a long-term volume-weighted moving average. The signal line is traditionally left as an exponential moving average.
Like and follow for more cool indicators!
Happy Trading!
Percentage Volume OscillatorThis indicator is based on Percentage Price Oscillator and volume as a source.
Moving Average Convergence/Divergence MaCD BackestingMade this to backtest simple macd trading strategy, had to set it to open long and short positions because i'm not sure how you get it to calculate otherwise.
MACD percentage price oscillatorMACD Percentage Price Oscillator is a variation of the MACD indicator. Signal line crossovers are almost identical. The major difference is the MACD Percentage scale which enables comparison between stocks at different prices.
MACD Percentage Price Oscillator's trading signals are the same as for the MACD indicator. The MACD indicator is primarily used to trade trends and should not be used in a ranging market. Signals are taken when MACD crosses its signal line, calculated as a 9 day exponential moving average of MACD.
First check whether price is trending. If the MACD indicator is flat or stays close to the zero line, the market is ranging and signals are unreliable.
Signals are far stronger if there is either:
- a divergence on the MACD indicator; or
- a large swing above or below the zero line.
- Unless there is a divergence, do not go long if the signal is above the zero line, nor go short if the signal is below zero. Place stop-losses below the last minor Low when long, or the last minor High when short.
The main advantage of MACD Percentage over MACD is the ability to compare indicator values across stocks.
The only difference with MACD Percentage Price Oscillator is that the difference between the fast and slow moving averages is calculated as a percentage of the slow moving average: MACD = (12 Day EMA - 26 Day EMA) / 26 Day EMA