[blackcat] L1 Another 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 Another Improved MACD Indicator improves MACD histogram by customized an algorithm and add three levels of long entry alerts derived from ema ().
Key Signal
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.
macd1 --> ema3 of macd
Pros and Cons
Pros:
1. more clear sub level trend change with new histograms
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
Another improved MACD on histogram
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.
D-histogram
ADX Histogram with DI linesInspired by the user scarf from Tradingview. In contrast with that other indicator, this one instead of a simple moving average (SMA) for the ADX calculations, uses a running moving average (RMA) or also known as Wilder's Average. I like having a histogram for the DI lines over just having lines alone because it makes it easier to see. In addition I made it so that values less than 5 for the DI lines are colored lightly to note that the movement was less significant(might not matter but some might care about it, atleast I do). The ADX has a color fainting effect too, and when it goes above the threshold then it becomes black to note that it is trending, as the indicator suggests.
The advantages with these additions and changes are that it shows a more traditional moving average like the original author Wellers Wilder suggested and you can see the crossings and directional movement changes easier from seeing the colors on the histogram easier than you would by looking at the DI lines alone. The disadvantages are you won't be able to tell when the ADX line is above both DI lines and when the ADX then makes a decrease from there(which can sometimes show a reversal), but personally it doesn't matter too much to me and perhaps to those who care more about seeing the direction than having to focus on all those 3 lines crossing all over the place.
[blackcat] L1 Close Histogram OscillatorLevel: 1
Background
A histogram is a special chart that is applied to statistical data that is divided into numerically ordered groups. For example groups with close relationships in the vicinity like "Close-ref(Close ,1)", "Close-ref(Close,2)" and so on. A histogram provides a snapshot of all the data so that you can quickly get an overview of the historical data, especially its general shape.In a histogram, the bars are linked - in contrast to a bar chart for categorical data, in which the bars represent categories that are in no particular order and are separated. The height of each bar in a histogram indicates either the number of individuals (called the frequency) in each group or the percentage of individuals (the relative frequency) in each group. Each individual in the data set falls into exactly one bar.
Function
L2 Close Histogram Oscillator is a novel overbought and oversold indicator that estimate the trend state by counting a specific bar relationship nearby. Once nearby bars reach consensus, it may spread to global quickly. The reason why I got this inspiration is because I have been engaged in the research of blockchain consensus mechanism. The market is a complex system, and its consensus depends on the common human characteristics: greed and fear. The trend of the market often also conforms to sociological characteristics. Maybe it's a bit complicated for me to say that. However, if you understand the principle of the spread of rumors and viruses, you can understand the situation where some individuals in the market have local consensus and gradually spread to the overall situation. This is the process of trend formation.
Key Signal
fastcounter --> fast close histogram counters
slowcounter --> slow close histogram counters
attention --> bottom price appears, with height of 10 in white
readybuy --> a small position buy opportunity after first bottom detected, with height of 20 in yellow
buylow --> a small position buy at low price, with height of 30 in lime
longentry --> a confirmed long entry signal by close histogram counter, with height of 40 in green
risk --> oscillator top is reached and trend reversal may happen, with height drop from 100 to 80 in red
Pros and Cons
Pros:
1. since this is based on consensus formation principle, i think this is a leading indicator by spreading local consensus to global
2. it is an oscillator, overbought and oversold can be easily observed.
Cons:
1. the model is not complex enough to depict market behavior exactly.
2. sideways and chop market will make this indicator's output hard to read.
Remarks
This is rare! I combined my previous theory of developing cellular automata with the market to produce such a weird indicator. I hope to inspire everyone and study market behavior in a deeper level.
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
Relative Strength of Volume Indicators by DGTThe Relative Strength Index (RSI) , developed by J. Welles Wilder, is a momentum oscillator that measures the speed and change of price movements.
• Traditionally the RSI is considered overbought when above 70 and may be primed for a trend reversal or corrective pullback in price, and oversold or undervalued condition when below 30. During strong trends, the RSI may remain in overbought or oversold for extended periods.
• Signals can be generated by looking for divergences and failure swings. If underlying prices make a new high or low that isn't confirmed by the RSI, this divergence can signal a price reversal. If the RSI makes a lower high and then follows with a downside move below a previous low, a Top Swing Failure has occurred. If the RSI makes a higher low and then follows with an upside move above a previous high, a Bottom Swing Failure has occurred
• RSI can also be used to identify the general trend. In an uptrend or bull market, the RSI tends to remain in the 40 to 90 range with the 40-50 zone acting as support. During a downtrend or bear market the RSI tends to stay between the 10 to 60 range with the 50-60 zone acting as resistance
This study aim to implement Relative Strength concept on most common Volume indicators, such as
• Accumulation Distribution is a volume based indicator designed to measure underlying supply and demand
• Elder's Force Index (EFI) measures the power behind a price movement using price and volume
• Money Flow Index (MFI) measures buying and selling pressure through analyzing both price and volume (used as it is)
• On Balance Volume (OBV) , created by Joe Granville, 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
Plotting will be performed for regular RSI and RSI of Volume indicator (RSI(VOLX)) selected from the dialog box, where the possibility to apply smoothing is provided as option. Additionally, labels can be added optionally to display the value and name of selected volume indicator
Secondly, ability to present Volume Histogram within the same study along with its Moving Average or Volume Oscillator based on selection
Finally, Volume Based Colored Bars , a study of Kıvanç Özbilgiç is added to emphasis volume changes on top of the bars
Nothing excessively new, the study combines RSI with;
- RSI concept applied to some of the common Volume indicators presented with a highlighted over/under valued threshold area, optional labeling and smoothing,
- added Volume data with additional information and
- colored bars based on volume
Thanks @Vishant_Meshram for the inspiration 🙏
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 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
Elliott Wave Oscillator Signals by DGTElliott Wave Principle , developed by Ralph Nelson Elliott, proposes that the seemingly chaotic behaviour of the different financial markets isn’t actually chaotic. In fact the markets moves in predictable, repetitive cycles or waves and can be measured and forecast using Fibonacci numbers. These waves are a result of influence on investors from outside sources primarily the current psychology of the masses at that given time. Elliott wave predicts that the prices of the a traded currency pair will evolve in waves: five impulsive waves and three corrective waves. Impulsive waves give the main direction of the market expansion and the corrective waves are in the opposite direction (corrective wave occurrences and combination corrective wave occurrences are much higher comparing to impulsive waves)
The Elliott Wave Oscillator (EWO) helps identifying where you are in the 5-3 Elliott Waves, mainly the highest/lowest values of the oscillator might indicate a potential bullish/bearish Wave 3. Mathematically expressed, EWO is the difference between a 5-period and 35-period moving average based on the close. In this study instead 35-period, Fibonacci number 34 is implemented for the slow moving average and formula becomes ewo = ema(source, 5) - ema(source, 34)
The application of the Elliott Wave theory in real time trading gets difficult because the charts look messy. This study (EWO-S) simplifies the visualization of EWO and plots labels on probable reversals/corrections. The good part is that all plotting’s are performed on the top of the price chart including a histogram (optional and supported on higher timeframes). Additionally optional Keltner Channels Cloud added to help confirming the price actions.
What to look for:
Plotted labels can be used to follow the Elliott Wave occurrences and most importantly they can be considered as signals for possible trade setup opportunities. Elliott Wave Rules and Fibonacci Retracement/Extensions are suggested to confirm the patters provided by the EWO-S
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 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
Rex Oscillator [CC]The Rex Oscillator measures market behavior based on the relationship of the close to the open, high and low values of the same bar. A big difference between the high and close on a bar indicates weakness, and wide disparity between the low and close indicates strength. The difference between open and close also indicates market performance. Buy when the indicator is green and sell when it turns red.
Let me know if you would like me to publish other scripts or if you want something custom done!
Statistical Histogram with configurable bins and Data WindowCreates a Histogram for Statistical Analysis of any source.
Input Parameters:
Sample Source: Select your source here, can be any numerical source.
Sample Period: Sample size for Mean and Standard Deviation Calculations.
Enable Cumulative Mode: Will attempt to calculate the bin for every sample in the entire dataset.
Window Period: Used only in Window Mode (Enable Cumulative Mode unchecked), Calculates the bin for the past Window Period sample size.
Bin Label Spacing: Adjust horizontal spacing of Bin Labels below the histogram for easier viewing.
Center Bin: Selects the center Bin, usually set to (0 - Bin Width) < Sample <= 0 standard deviations or (z_score)
Bin Width: Selects the Bin Width in standard deviations.
How you can use it:
View characteristics of dataset such as unimodal/bimodal and skewness to determine preferred statistical analysis.
Additional Reference:
en.wikipedia.org
en.wikipedia.org
Credits:
Thanks goes out to www.tradingview.com , for cleaning up some of the code and www.tradingview.com for the original idea.
Usage Tips:
When adjusting the bin parameters, center bin and bin width, verify that the total sum of the bins (Sum Frequency in the Data Window) is close to the Total Samples. If your Sum Frequency is drastically lower it means you need to adjust your center bin and/or bin width to capture more of the data available.
Fear And Greed IndicatorThe Fear And Greed Indicator is a very popular indicator on the Bloomberg platform and since I didn't have actual source code to work with, this is a very close approximation of that indicator. Let me know if you spot any discrepancies with the original and I will do my best to fix them.
For buy and sell signals it is pretty straightforward. Just buy when the green (greed) is in control and sell when the fear (red) is in control
This was a special request so let me know if you want to see more scripts from me or if you want something custom!
Altcoins capitalization histogram [peregringlk]This script superseeds "Other altcoins BTC capitalization histogram". The previous versions was a bit confusing in my opinion and lacked some generalization, so I'm now publishing this improved version.
It shows 6 pieces of info:
- Green columns: BTC price change for that day.
- Red bars: Altcoins capitalization change for that day, measured in bitcoins (altcoins_USD_capitalization / BTCUSD)
- Green/red background: green if that day the USD capitalization change was a gain, and red if it was a loss.
- Green line: accum BTC price change for the selected last days.
- Red line: accum altcoin capitalization change measured in BTC for the selected days.
- Dotted blue sequence: accum altcoin USD capitalization change for the selected days.
The base line of the histogram is 1 instead of 0, because I'm showing the price changes as multipliers (price change rates), so if there have been a +20% market movement, the calculated value will be 1.2, and if there have been a -20% market movement, then the value will be 0.8. 1 means no movement (preserved price/capitalization). Price and capitalization changes will be calculated using candle closes.
About the accumulated price changes, it will calculate the accumulated multiplication of the corresponding price change multipliers. For example, if you have set you want 3 days for the accumulation rates, and the last three days saw a -20%, +10% and +15% price/capitalization changes, the current value for the line will be 0.8*1.1*1.15 = 1.0120, or a +1.2% price change respect to the day before yesterday.
By default, if you are looking any ALTBTC market (for example, ETHBTC), instead of showing the USD and BTC capitalization of all alts, it will take the BTC and USD prices of the current market (the USD price will be calculated as ALTBTC * BTCUSD; and the BTCUSD price will be taken from BITSTAMP, the one with the longest BTC history I know in tradingview). If you are looking any other markets that is not paired with BTC, then it will take the USD capitalization of all altcoins, and the BTC capitalization will be calculated as altcoins_USD_capitalization / BTCUSD (from BITSTAMP as well).
Also, remember that, in both cases (alts capitalization or price), the graph will consistently respect the following rule:
- btc_usd_price_change * alt/capitalization_btc_price_change = alt_usd_price_change.
That applies for both the green/red bars respect to the background, and the green/red line respect to the blue dotted sequence.
Lastly, you may want to know if, in case btc price and altbtc price or capitalization go in opposite directions, who gain the battle? For example, if BTCUSD moved +20%, and an ALTBTC price moved -20%, the result is a loss, because 1.2*0.8 = 0.96, so the ALTUSD price or capitalization moved -4% (remember that, for preserving the USD value, if today's bitcoin change rate is x, the altbtc change rate must be 1/x; so for a -20% BTCUSD price movement, there must be at least a +25% ALTBTC price change to don't loss USD value, because 1/0.8 = 1.25). The background is what shows you that: if the background is green, it means that for that day there was a total USD gain of value, and when it's red, then it was a loss of USD value.
You can customize the following things:
- Accum change rate interval: the "selected days". By default 7.
- Take alts-capitalization?: By default unmarked. The effect when is unmarked is what I have explained in the previous paragraph. If you mark it, then it will use the USD_capitalization of all alts no matter what market you are looking right now.
- Which capitalization do you want? There are three options, that applies when "Take alts-capitalization?" is marked, or otherwise, when you are not looking a BTC-paired market.
- - - All-alts (default option): take CRYPTOCAP:TOTAL2 security as reference Alts-capitalization, which represents all altcoins.
- - - Other-alts: take CRYPTOCAP:OTHERS security as reference Alts-capitalization, which represents all altcoin except the 9 most capitalized alts.
- - - Big-alts: take CRYPTOCAP:TOTAL2 - CRYPTOCAP:OTHERS as reference Alts-capitalization, which represenst only the 9 most capitalized alts.
The idea of this script is:
A) Figuring out what is causing a USD value gain or loss, the alts market movements, or the BTC price change. So you can spot if some altcoin, or all altcoins combined, are gaining or loosing value by themselves or because of bitcoin.
B) Trying to spot or discover some patterns that allows you to identify altseasons. Once an altseason has been developed, the chart will show it in a pretty obvious way (massive red line bells and dotted blue lines with very high values during a period of various weeks). The hard problem is to spot it in advance, and maybe this graph can help.
Z-HistogramIt is possible to approximate the underlying distribution of a random variable by using what is called an "Histogram". In order to construct an histogram one must first split the data into several intervals (also called bins) often of the same size and count the number of values falling within each intervals, the histogram plot is then constructed with the X axis representing the measured variable and the Y axis representing the frequency.
The proposed script aim to estimate the underlying distribution of a rolling z-score by constructing its histogram, here the histogram consist of 13 bins of width 0.5 rolling standard deviations. The length setting define the rolling z-score period, the window setting define the number of past data to be counted, finally using the "Total" option (true by default) will count all the rolling z-scores values since the first bar, in order to use the window setting make sure to uncheck the "Total" option.
DISPLAY
In order to see the entirety of the histogram make sure to double click on the indicator window and to have all the lower panels (text notes, pine editor...etc) hidden, finally make sure to zoom-in in order to see the frequency numbers displayed.
Z-Histogram on BTCUSD 15 min TF, the blue bins represent intervals situated over 0 while red bins represent intervals situated under 0. Here σ represent the X-axis in standard deviations, the histogram start with a bin situated at σ = -3 which count the number of times the rolling z-score was within -3 and -2.5, the histogram end with the bin situated at σ = 3 which count the number of time the rolling z-score was within 3 and 3.5.
It is also possible to look at the shape of the histogram without having the indicator window at full size.
INTERPREATION
An histogram can give really interesting information such as overall trend direction and strength. The direction can be measured by looking at the skewness of the histogram, with a negative skewness (the peak of the histogram situated at the right from the center) representing down-trending variations and positive skewness (the peak of the histogram situated at the left from the center) representing up-trending variations, while a symmetrical histogram could represent a ranging market. The farther away the peak of the histogram is situated from the center, the stronger the trend.
Another interesting characteristic is the tailedness of the histogram, which can give information about the cleanliness of the trend, for example a positive skew and high tailedness would represent a clean up-trend, as it could suggest less variations contrary to the main trend.
An histogram applied to the rolling z-score can give various useful information. As a recall the rolling z-score of the price measure the distance between the closing price and its moving average in term of rolling standard deviations, for example if the rolling z-score is equal to 2 it means that the closing price is currently 2 rolling standard deviations over its moving average.
Lets for example analyze the histogram using INTC 15 min tf with a window of 456 bars and rolling z-score of length = 100 in order to review longer term variations.
We can see from the histogram that the uptrend visible on the chart is represented by the bins situated over 0 having an overall higher frequency than the bins under 0, we can see that the closing price tended to stay between 1 and 1.5 rolling standard deviations over its period 100 moving average. Here bins under 0 accounts for retracements in the trend.
IN SUMMARY
An histogram can give various information regarding the price evolution of a security, the proposed script aim to plot the histogram of a rolling z-score. Now this script might not be too useful but it was fun to make, also it does not mean that an histogram is not an useful tool in the context of trading, the only thing required is a god implementation of it (like volume profiles for example)
In this post we have also reviewed some important statistical concepts such as distributions, z-score, skewness and tailedness, each being extremely important in the quantitative trading field.
Thx for reading !
iTrendPorted version of the original iTrend.mq4, use it as a trend detector, just check the color of the upper bars in the histogram.
BTC Power Law HistogramBased on "Bitcoin’s natural long-term power-law corridor of growth" by Harold Christopher Burger
Buying and Selling Smoothed with HistogramBuying and Selling Smoothed with Histogram
Smoothed version with version with a red line representing the selling pressure and a green line which represents the Buying pressure.
If the green line is above the red line it would mean that the Buying pressure is more and vice versa.
The difference between the two is plotted as a Histogram. This is a cumulative value of the buying and selling pressure and provides a easy visual presentation of the dominating pressure.
MACD and RSI divergence by Rexio v2Hi everyone!
I wrote this indicator for intraday trading and it cannot be use only by itself you need to at least draw some S/R lines to make it useful. It is based at MACD histogram and gives signal when it sees divergence on MACD/RSI/MACD's Histogram (or all at once - settings) when macd's histogram switchs trend. Im using it to playing with a trend most of the time looking for hidden divergence at higher time frame and after that looking for regular divergence at lower time frame.
Im not a computer programist nor professional trader so it is only for educational purposes only.
MACD histogram divergence by Rexio v1Hi everyone!
I wrote this indicator for intraday trading and it cannot be use only by itself you need to at least draw some S/R lines to make it useful. It is based at MACD histogram and gives signal when it sees divergence on MACD's Histogram when macd's histogram switchs trend. Im using it to playing with a trend most of the time looking. It highlights candles which can give good singnals to play with a trend (its based on ema200 and RSI overbought and oversold zones).
Im not a computer programist nor professional trader so it is only for educational purposes only.
MACD - Baby WhaleI spiced the standard MACD indicator up a bit to make it more visible.
When using the MACD:
1. Never go short when the MACD lines are in the negative.
2. Never go long when the MACD lines are in the positive.
3. Always wait for an uptick / downtick on the histogram before you start your trade.
The MACD Histogram can also show you Divergence.
When the price goes up but the Histogram can't make new highs, it might be a good time to think about shorting.
If you want access, just send a message please.
Much love from Baby Whale!!
🙏❤️🐳
VWMA CrossesThis is a simple tool that gives traders a simple visual representation of Volume-Weighted Moving Average ( VWMA ) crossovers that is pretty similar to the MACD . We don't typically trade solely based on the VWMA , but it is definitely one of our go-to tools when combining multiple indicators.
When trading with VWMA's, it is common to enter a position when the fast VWMA crosses over the slow VWMA . In other words, the fast VWMA was previously less than the slow VWMA and is now greater in value than the slow VWMA . Conversely, traders often exit their positions when the fast VWMA crosses under the slow VWMA .
This tool plots the absolute value of the difference between the fast and slow VWMA's as a histogram. When the difference between the fast and slow VWMA's is greater than zero (meaning fast > slow), then the bars are green. The bars then turn red when the fast VWMA is less than the slow VWMA . The blue circle-line is a Simple Moving Average of the difference between the two lines.
Here's a quick guide to interpreting the chart:
if (fast VWMA > slow VWMA ) and (difference < sma of differences)
then color = lime green
if (fast VWMA > slow VWMA ) and (difference > sma of differences)
then color = dark green
if (fast VWMA < slow VWMA ) and (difference < sma of differences)
then color = light red
if (fast VWMA < slow VWMA ) and (difference > sma of differences)
then color = dark red
~Happy Trading~
Combo Strategy 123 Reversal & (H-L)/C Histogram This is combo strategies for get
a cumulative signal. Result signal will return 1 if two strategies
is long, -1 if all strategies is short and 0 if signals of strategies is not equal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This histogram displays (high-low)/close
Can be applied to any time frame.
WARNING:
- For purpose educate only
- This script to change bars colors.
4H MACD Histogram on 1HIndicator is designed for 1 hour time-frame and it shows the value of 4 hour MACD histogram