(JS) VWAP BandsThis is a pretty simple script here - I took the VWAP and combined it with Bollinger Bands.
The bands can vary a lot based on chart resolution, so I wanted to make sure the resolution could be modified so you can use the resolution you're most comfortable with, or find the most success with.
Length:
Length of bars used to calculate the bands.
Standard Deviation Band 1-3:
There's three bands all together, this option allows you to modify the number of standard deviations per band.
VWAP Period:
This modifies when you want the VWAP to begin (Session, Week, Month, Year).
Offset:
This moves the VWAP and the bands the amount of bars you select, default is of course set to zero.
Source:
This selects the source of calculation, HLC/3 is the default VWAP calculation.
This is a pretty self explanatory script, I thought being able to see the standard deviations of the VWAP could prove to be useful - hope you all like it!
볼륨 인디케이터
Anti-Volume Stop LossFINALLY!
As everyone who tried to create, understand, or even find the Buff Pelz Dormeier Anti-volume stop-loss indicator knows that - it's not easy. Personally, I have partially, or perhaps completely figured out, the tips Buff had given in Investing with Volume Analysis book.
AVSL now is ready.
Please do some test and give me a feedback how it works in your trade strategy.
Anti-Volume stop loss - AVSL
from Investing with Volume Analysis book CHAPTER 20 • RISKY BUSINESS 253-256:
"It is important in any risk-management process to predetermine an objective decision point level (a stop loss) to exit, thereby protecting principal in case you are wrong. My objective sell point is determined by using a quantitative formula I refer to as Anti-Volume Stop Loss (AVSL). Having a quantitative, yet intelligent sell point eliminates the emotional struggles involved in deciding when to exit a position.
AVSL is a technical methodology that incorporates the concepts of support, volatility, and, most importantly, the inverse relationship between price and volume. The AVSL combines the concepts of the VPCI (Volume Price Confirmation Indicator) and John Bollinger’s Bollinger Bands to create a trailing stop loss.
AVSL = Lower Bollinger Band – (Price, Length, Standard Deviation)
Where:
Length = Round (3 + VPCI)
Price = Average (Lows × 1 / VPC × 1 / VPR, Length)
Standard Deviation = 2 × (VPCI × VM)
One of the most difficult decisions is determining what one’s maximum loss threshold should be. Some say 2 percent; others say 20 percent. I believe the more volatile a security, the looser the stop should be. A nonvolatile security, such as Coca-Cola, might move 7 percent a year, while a volatile security such as Google might move 7 percent in a day. If you use a 7 percent stop for Coca-Cola, it might take a year to be stopped out while the security underperforms.
However, if you use 7 percent for Google, you can be stopped out intraday, not allowing the investment an opportunity to develop. By using the lower Bollinger Band of the securities lows, the AVSL considers each individual security’s own volatility. Thus, a volatile security would be granted more room of the stocks low while a stable security would have a tighter leash (see Figure 20.7).
The next important step is employing the price-volume relationship into the calculation. Volume gauges the power behind price moves. In accounting for this, when a security is in an uptrend and has positive volume characteristics, it is given more room. However, if the security exhibits contracting volume characteristics, then the stop is tightened. In this way, if a negative news event affects an unhealthy security, the stop is tighter, thus preserving more of your profits.
However, if the negative news event affects a security whose price-volume relationship is healthy, the stop has been loosened, avoiding the temporary whipsaw of an otherwise strong position. In these ways, AVSL lets the market decide when to exit your position.
AVSL tailors each security for support, volatility, and the pricevolume relationship based on an investor’s time frame as calculated from the chart data. For example, my portfolio positions are continually re-evaluated with this AVSL methodology, which yields the possibility of raising the decision point threshold periodically based on the time frame of my investment objective. With my short-term Giddy-up portfolios, I use daily chart data and seek to raise my maximum loss stop on a daily basis.
My intermediate ETF and stock positions are calculated off of weekly data and then re-evaluated weekly. With my longer term stock portfolios, the decision point is calculated off data revised monthly. This analytical approach that uses measurable facts over emotion or gut instincts allows me to maintain my objectivity. Thus objectivity, not emotion, informs my investment decisions."
How look mine AVSL:
Price component = low × 1/VPC × 1/VPR : for VPC > 1 and VPC < -1 | low × 1 × 1/VPR : for 1 > VPC > 0 | low × -1 × 1/VPR : for 0 > VPC > -1
AVSL Price = sma((low × 1/VPC × 1/VPR) , length) / 100
length = round : for VPCI > 0 | round [ absolute ] : for VPCI < 0 | 3 : for VPCI=0
Standard Deviation = mult × VPCI × VM)
AVSL = sma(Actual low price - AWSL Price + Standard Deviation, 26)
It's hard to say is it the same as in Buff Pelz Dormeier book, but I encourage you to modify the script for better results.
DTR vs ATR w RVolDTR vs ART along with Relative Volume in Percentage. So if you see RVol as 200% with input length of 10 days, today's volume is 2x compared to past 10 days. It helps if today's volume is already reached 20% or 30% within 30mins of market open, etc.
WholvolTotal Volume Of Crypto Pairs Based on TV Top Exchanges
See the whole volume with additional feature and options.
Report volume data in USD, BTC, itSelf.
See each exchange Share and Volume.
Static and Dynamic value filtering.
MAs crosses.
Note.1
Due to the pine limitations, we have selected the most important Exchanges which have valuable volume.
Note.2
When you choose to report stats in BTC unit and you have chart of altcoins, the BTC source price will extract from your pair exchange.
Note.3
When you choose to report stats in USD unit, Historical volume data worth will calculated using your entered source price BUT on Realtime data, script will use latest price(close) as source price.
Note.4
You must only select the exchanges which support your pair, otherwise you will see error.
Trend Thrust Indicator - RafkaThis indicator defines the impact of volume on the volume-weighted moving average, emphasizing trends with greater volume.
What determines a security’s value? Price is the agreement to exchange despite the possible disagreement in value. Price is the conviction, emotion, and volition of investors. It is not a constant but is influenced by information, opinions, and emotions over time. Volume represents this degree of conviction and is the embodiment of information and opinions flowing through investor channels. It is the asymmetry between the volume being forced through supply (offers) and demand (bids) that facilitates price change. Quantifying the extent of asymmetry between price trends and the corresponding volume flows is a primary objective of volume analysis. Volume analysis research reveals that volume often leads price but may also be used to confirm the present price trend.
Trend thrust indicator
The trend thrust indicator (TTI), an enhanced version of the volume-weighted moving average convergence/divergence (VW-Macd) indicator, was introduced in Buff Pelz Dormeier's book 'Investing With Volume Analysis'. The TTI uses a volume multiplier in unique ways to exaggerate the impact of volume on volume-weighted moving averages. Like the VW-Macd, the TTI uses volume-weighted moving averages as opposed to exponential moving averages. Volume-weighted averages weigh closing prices proportionally to the volume traded during each time period, so the TTI gives greater emphasis to those price trends with greater volume and less emphasis to time periods with lighter volume. In the February 2001 issue of Stocks & Commodities, I showed that volume-weighted moving averages (Buff averages, or Vwmas) improve responsiveness while increasing reliability of simple moving averages.
Like the Macd and VW-Macd, the TTI calculates a spread by subtracting the short (fast) average from the long (slow) average. This spread combined with a volume multiplier creates the Buff spread
Heatmap Volume [xdecow]This indicator colors the volume bars and candles according to the volume traded. The calculation of the heat map zones is done as follows:
how many standard deviations the volume are distant from the average volume?
For a better visual experience, place the borders and wicks of the candles in a neutral color.
Banabi Hacim by HassonyaThe Banabi Hacim indicator shows you the movement of volume in the last bar in terms of percentage buying and selling directions. You can use it in any period you want. It is designed to help you and give you ideas for buying or selling. It will be your assistant in critical places where you are thinking of buying or selling.
Thanks for supports
TÜRKÇE AÇIKLAMA
Banabi Hacim indikatörü size son barda gerçekleşen işlem hacim hareketini yüzdesel olarak alış ve satış yönlü olarak gösterir. İstediğiniz periyotta kullanabilirsiniz. Alım yada satım yapmak için size yardımcı olmak ve fikir vermek için tasarlandı.
Destekleriniz için teşekkürler
Hayrını görün sevgiler
Delta Volume Weighted - IntradayResets at the start of the day's session (9:50 am on the ASX).
Takes the first candle and checks if its a green candle (close > open), and adds the volume to a total (which starts at 0 at the start of the day).
Subtracts it if the candles in red.
Continues to do this along with all the candles.
The volume is also multiplied by the difference between open and close so that large candles with large volume have more weight and move the indicator more.
Market EmotionsThis is a simple and fun indicator I built out of boredom one night. It's great for a quick laugh, but other than that, it's useless. It simply displays emotes for various thresholds of change in price between the open and close of a candle. For example, unicorn candles are any candles that gain 25% or more from opening price to closing price.
Aggregate BTC VolumeSimple script that shows the aggregate volume of BTC, taking volume data from top spot and derivative exchanges.
Price/Volume Value HistogramAn interesting implementation of mine to measure an asset changes based on asset price velocity and volume velocity. The indicator acts as asset value calculator. Long and Short.
==Points System Rules==
UPTRENDING
If Current Close is higher than previous Close and Current Volume is bigger than previous Volume: Adds Close Points and Volume Points
Otherwise check
If Current Close is higher than previous Close: Adds Only Close Points
DOWNTRENDING
If Current Close is lower than previous Close and Current Volume is bigger than previous Volume: Reduces Close Points and Volume Points
Otherwise check
If Current Close is lower than previous Close: Reduces Only Close Points
==Plotting==
Result of the values are summed up to a histogram.
Obviously on increasing prices and volume the histogram will be above zero line and on the Bullish side (green color), otherwise, on the Bearish side (red color).
You can't cheat the price movement, it's just what it is.
Optional to smooth it by EMA (set to true by default).
Like if you Like and Enjoy!
Follow for upcoming indicators.
Bitcoin M2 supply adjusted priceThis script plots bitcoin candles adjusted by M2 supply (blue line), helping the trader to obtain insight of new support/resistance levels adjusted by M2 supply.
Note: As it was not possible to make the price adjust automatically by the last M2 value (pinescript limitation, I guess), the input parameter "M2Last" must be updated manually observing the last M2 value in blue curve.
Volume Brakeout v1Volume Brakout indicator is used to help determine trend direction strictly based on Negative and Positive volume data.
How to Read:
- Moving Average crossovers are used to help determine a possible trend change or retracement.
- The area cloud on the bottom is calculated by the difference of the moving averages. This could be used to help determine the trending volume strength.
- Bright colored volume bars are large volume spikes calculated by the x factor in the options.
Other changes:
- Volume Depth is going open source with numerous of its indicators. This is only one of many!
- Volume is now displayed without being altered for calculations.
Cumulative Volume v3The script, for Pine Script version 3, shows how to accumulate volume values during a defined session/period.
The input is the period to use for accumulation. "D" is the default value, useful to view data for each session.
This is slower than version 4 because there is no "var" and you need to use a loop. Also, you can't use "sum( volume , cnt_new_day)" with a variable length argument instead of "for".
DePriExchange weighted price for cryptocurrencies
DECENTRALIZED PRICE CHART FOR DECENTRALIZED WORLD
See non-manipulated , globally price action that comes from whole liquidity!
The main idea behind this script is that...
The value of each trading pair finally determined globally and the price displayed in exchanges is its own and not global! differences between exchanges, reduced to near zero gradually by market makers and arbitrages, so..
Every min tick price changes Must be backed by liquidity to be part of the global fluctuations
more liquidity gives it more credibility
more credibility give it more weight
..Against opposing movements.
This script can collect price of crypto pairs from 12 exchanges that listed on TV and have effective volume.
In the first step, summarizes the volume of all exchanges and creates the total volume
In the next step, divide each exchange volume to total volume to obtain relative weight of each exchange.
In the final step, multiply each exchange price to weight of itself and summarizes these numbers .. now, we have Exchange weighted price!
The results on high liquidity pairs like BTCUSDT, ETHUSDT, is not much differ then simple chart but when you apply it on lower liquidity, lower time frames of altcoins, you realize its benefits and usefulness. Altcoins chart in composite and simple mode is very differ, I hope you enjoy from TRUE CHART.
With this, also you can..
Filter and smooth candlestick chart with SMA or EMA
Plot a line chart of pair at your desired frame separate from the main chart for monitor important price levels
Get realtime report of whole volume of pair on included exchanges
Get realtime report of each exchange weight and share
Note.1:
some of pairs queted on more than one like BTCUSD, BTCUSDT, BTCUSDC and etc. In this pairs we choose the one that usually has more volume on that exchange.
Note.2:
At this time, supported queted currencies are BTC, ETH, USD, USDT, BUSD, USDC, USDK.
Note.3:
This script is relatively heavy! This is not cuz of bad coding.
Each bar compution contains at least one plot and some of security calls, so 10 to 15 seconds is normal load time.
Note.4:
You can combine this with your price action base scripts and use balanced OHLCV. The necessary explanations about this are available in the code.
Note.5:
You must only include exchanges that support your ticker, Otherwise you will receive an error.
I hope it comes useful to you.
DAX VolumeDAX index (DEU30) hourly volume indicator, which is obtained by adding the sum of the underlying stocks volume.
The volume is displayed in millions of EUR.
Closing RangeIndicator shows the closing range of each bar. Closing range is where the bar closes (high - close) relative to the length of the wick (high - low). A close at the top of the wick would be 100%, middle 50%, bottom 0%.
In addition, the indicator multiplies closing range by volume to weight toward high volume days.
A simple moving average is applied to visualize trend in volume-weighted closing range over time.
Options include changing the threshold of bullish closes. The default is 50%, but you can view a close above 40% as a bullish.
Simple moving average can be enabled/disabled as well as the length adjusted.
Delta Volume v2.1 by kernel_phiOld Version:
The source code of this script is now open. Feel free to modify it.
*** Not real-time. The indicator will be calculated only after a bar is closed. ***
Slippage Calculator Hello everyone,
This is the first script I publish, also my English is not the best my apologies.
This simple study script is an attempt to estimate the slippage during a trade. By no means it is a precise calculation, it is just an approach that can be improved.
You are welcome to take this simple script and use it and change it at your convenience just ask your acknowledge.
My approach considers the total fluctuation the price gets as a consequence for the total volume on that specific bar.
The volume on each bar is given in BTC, thus you get that by using the formula.
vol = volume * vwap
The total variation in price is considered as twice the size of the bar plus the gap between to consecutive bars. that is the
total fluctuation of price on each bar = (2 * (high - low) + abs(open - close )) which is not totally true since inside each bar price can fluctuate a lot more.
The script considers you are trading your total equity (eq_BTC ) each time. The fraction of your equity of the volume bar is eq_BTC / vol
Then eq_BTC / vol is the portion or the total fluctuation in price that is due to your entry or exit from the market.
(2 * (high - low) + abs(open - close )) * eq_BTC / vol
is the average change in price due you enter o exit a position.
** the 2 factor accounts for the two directions in the market buying and selling. There is more behind this formula I can explain you in more detail if you like.
I haven't seen anywhere a formula like this one, so it is intended to be a first attempt to get a better approach.
Finally the output of the scripts is how many ticks the price might change due to your trade on each bar
round(slippage/syminfo.mintick)
The script is focused in crypto but it can be used as well on forex markets.
Take care,
@yvponce
Freedom of MovementFreedom of Movement Indicator
---------------------------------------------------------
In “Evidence-Based Support & Resistance” article, author Melvin Dickover introduces two new indicators to help traders note support and resistance areas by identifying supply and demand pools. Here you can find the support-resistance technical indicator called "Freedom of Movement".
The indicator takes into account price-volume behavior in order to detect points where movement of price is suddenly restricted, the possible supply and demand pools. These points are also marked by Defended Price Lines (DPLs).
DPLs are horizontal lines that run across the chart at levels defined by following conditions:
* Overlapping bars: If the indicator spike (i.e., indicator is above 2.0 or a custom value) corresponds to a price bar overlapping the previous one, the previous close can be used as the DPL value.
* Very large bars: If the indicator spike corresponds to a price bar of a large size, use its close price as the DPL value.
* Gapping bars: If the indicator spike corresponds to a price bar gapping from the previous bar, the DPL value will depend on the gap size. Small gaps can be ignored: the author suggests using the previous close as the DPL value. When the gap is big, the close of the latter bar is used instead.
* Clustering spikes: If the indicator spikes come in clusters, use the extreme close or open price of the bar corresponding to the last or next to last spike in cluster.
DPLs can be used as support and resistance levels. In order confirm and refine them, FoM (Freedom of Movement) is used along with the Relative Volume Indicator (RVI), which you can find here:
Clustering spikes provide the strongest DPLs while isolated spikes can be used to confirm and refine those provided by the RVI. Coincidence of spikes of the two indicator can be considered a sign of greater strength of the DPL.
More info:
S&C magazine, April 2014.
[WJ] - Corrected Seconds Volume** ONLY WORKS FOR SECONDS CHARTS **
After staring at a chart and scratching my head, I realized that the volumes were being incorrectly reported for lower time frames.
A chart that has no updated tick for 5 minutes will report the volume that occurred in the WHOLE 5 minutes - in one tick.
For a 5 second chart like above, we have now a chart that at first appearance is giving us numbers to believe that there is MUCH more liquidity than is real.
This can really confuse us, and other scripts that rely on volume information.
This script simply takes into consideration the time delay before the next tick. If it took 5 minutes to update a tick, the volume should be divided into whatever seconds we are currently using. I also changed the coloring code - if there is no length to the candle it will look at the candle before it to determine if it is a positive or negative movement.
It does make technical sense to have the volume that occurred over 5 minutes in one tick as it is the true volume. However, this script should not be viewed as the absolute value, but a consistent, usable number that will be more accurate with tools.
To give a quick example on why this is important:
In a 10 second chart, we are given an updated tick every minute. In 2 minutes we have 2 ticks that have 1K volume each.
Alternatively, we have a 10 second chart, and we are given an updated tick every 10 seconds. In 2 minutes we have 12 ticks that have 100 volume each.
With quick mental math we can determine that the second scenario is actually (albeit slightly) more busy. However, a script would not do that extra layer of math and would assume that the first scenario is bouncing off the walls with activity and the second is a graveyard.
It's exactly for this example that I have created this script, and I hope it helps someone else out.
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