Bullish/Bearish Reversal Bars Indicator [Skyrexio]Introduction
Bullish/Bearish Reversal Bars Indicator leverages the combination of candlestick reversal bar pattern and the Williams Alligator indicator to help traders in understanding where there is a high probability of market reversal or correction. Indicator works for both bearish and bullish cases. It visualizes the bearish and bullish reversal bars with red and green dots and also plots the Alligator's lips to make it more convenient for traders to understand if price is above or below lips line (more information in "Methodology and it's justification" paragraph).
Features
Market Facilitation Index(MFI) filter: with the specified parameter in settings user can choose to filter bullish and bearish reversal bars which passed the MFI condition.
Awesome Oscillator(AO) filter: with the specified parameter in settings user can choose to filter bullish and bearish reversal bars which passed the AO condition.
Alerts: user can set up the alert and have notifications when bullish/bearish reversal bar has been printed.
Methodology and it's justification
In the script’s methodology, we apply the concepts of bullish and bearish reversal bars introduced by Bill Williams in his book Trading Chaos. So, what exactly is a bullish or bearish reversal bar? At its core, it’s a candlestick pattern. A bullish reversal bar is a bar that closes in its upper half, while a bearish reversal bar closes in its lower half.
Why is this type of bar significant? Let’s look at the bullish reversal bar as an example. When the price is trending upward, forming higher highs with each candle, and we suddenly see a bullish bar that makes a new high but ultimately closes in its lower half, it signals a shift in control. Bears have taken control toward the end of that candle's period, pushing the price back down. This can be interpreted as a sign of trend weakness and a potential reversal (or at least a correction).
An additional key point is that a reversal bar often indicates a possible end to the trend. Therefore, for a reversal bar to be valid, several preceding candles should show lower highs (for bullish bars) or higher lows (for bearish bars), reinforcing the likelihood of a trend change.
The second step on methodology is the location of the bar related to Williams Alligator. The Williams Alligator Indicator, developed by Bill Williams, is a technical analysis tool that helps traders identify trends and potential turning points in the market. It consists of three lines, often called the jaw, teeth, and lips of the alligator, each representing different moving averages:
Jaw (Blue Line): A slower moving average, typically a 13-period smoothed moving average shifted 8 bars into the future.
Teeth (Red Line): A medium moving average, typically an 8-period smoothed moving average shifted 5 bars into the future.
Lips (Green Line): A faster moving average, usually a 5-period smoothed moving average shifted 3 bars into the future.
When the three lines are spread out and moving in the same direction, it suggests a strong trend (the "alligator" is "awake and feeding"). When they intertwine, the indicator suggests that the market is moving sideways, or in a range, signaling a lack of clear trend (the "alligator" is "sleeping"). Traders use the Alligator Indicator to enter trades in trending markets and avoid trades in choppy, non-trending markets.
If bullish reversal bar's high is not below and bearish reversal bar's low is not above all three Alligator's lines (jaw, lips, teeth) they cannot be interpreted as these types of bars. It can be explained as following: if we are waiting for the bullish reversal bar it shall be reversal from downtrend. If price is not below all three lines it can't be interpret as the downtrend according to this method. The opposite is true for the bearish reversal bar.
All described above are obligatory conditions for reversal bar, now let's discuss two not obligatory conditions. The first one is Market Facilitation Index (MFI) restriction. Let's briefly look what is MFI. The Market Facilitation Index (MFI) is a technical indicator that measures the price movement per unit of volume, helping traders gauge the efficiency of price movement in relation to trading volume. Here's how you can calculate it:
MFI = (High−Low)/Volume
MFI can be used in combination with volume, so we can divide 4 states. Bill Williams introduced these to help traders interpret the interaction between volume and price movement. Here’s a quick summary:
Green Window (Increased MFI & Increased Volume): Indicates strong momentum with both price and volume increasing. Often a sign of trend continuation, as both buying and selling interest are rising.
Fake Window (Increased MFI & Decreased Volume): Shows that price is moving but with lower volume, suggesting weak support for the trend. This can signal a potential end of the current trend.
Squat Window (Decreased MFI & Increased Volume): Shows high volume but little price movement, indicating a tug-of-war between buyers and sellers. This often precedes a breakout as the pressure builds.
Fade Window (Decreased MFI & Decreased Volume): Indicates a lack of interest from both buyers and sellers, leading to lower momentum. This typically happens in range-bound markets and may signal consolidation before a new move.
For our purposes we are interested in squat bars. This is the sign that volume cannot move the price easily. This type of bar increases the probability of trend reversal. In this indicator we added to enable the MFI filter of reversal bars. If potential reversal bar or two preceding bars have squat state this bar can be interpret as a reversal one.
The second additional filter is Awesome Oscillator. The Awesome Oscillator (AO), developed by Bill Williams, is a momentum indicator that measures market momentum by comparing recent price action to a longer historical context. It helps traders identify potential trend reversals and the strength of trends. Formula:
AO = SMA5(Median Price) − SMA34(Median Price)
where:
Median Price = (High + Low) / 2
SMA5 = 5-period Simple Moving Average of the Median Price
SMA 34 = 34-period Simple Moving Average of the Median Price
If AO is decreasing momentum is bearish, if increasing - bullish. According to Bill Williams approach reversal bars are the potential trades against the trend. As a result we added second filter for bullish reversal bars AO shall be decreasing, for bearish increasing.
How to use indicator
Apply it to desired chart and time frame. It works on every time frame.
Setup the filters with the "Enable MFI" and "Enable AO" checkboxes in the settings. By default they are turned on.
Analyze the price action. Indicator plotted the white line, this is the lips of an Alligator. It will help you to understand how price is moving in comparison to lips line. Indicator will print the green dot and text "BULL" below it current bar is bullish reversal. It will print the red dot and text "BEAR" above it if current bar is interpreted by algorithm as a bearish reversal.
Set up the alerts if it's needed. Indicator has two custom alerts called "Bullish reversal bar has been printed" and "Bearish reversal bar has been printed"
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test indicators before live implementation.
Índice de facilitación de mercado
DrNon_NASDAQ10Title: NASDAQ 10 Index with TOP 10 Securities
Introduction:
TradingView offers traders and investors a powerful platform for technical analysis and trading. One of its notable features is the ability to create custom indices based on the values of multiple individual securities. In this blog post, we will explore how to build a custom index with 10 securities in TradingView using Pine Script, the platform's proprietary programming language.
Description:
Custom indices allow market participants to track the performance of a specific group of securities, providing valuable insights into the collective performance of the chosen assets. By leveraging Pine Script, traders can easily develop and deploy custom indicators and strategies to build their own indices.
The script provided focuses on creating a custom index with 10 securities. The selected securities include popular stocks such as AAPL (Apple Inc.), MSFT (Microsoft Corporation), GOOG (Alphabet Inc.), AMZN (Amazon.com Inc.), NVDA (NVIDIA Corporation), TSLA (Tesla Inc.), META (Facebook, Inc.), AVGO (Broadcom Inc.), PEP (PepsiCo, Inc.), and COST (Costco Wholesale Corporation).
Using the security() function in Pine Script, we retrieve the closing prices of each individual security to ensure accurate data for the index calculation.
The index value is then calculated by summing the closing prices of the 10 securities. This simple arithmetic operation captures the overall performance of the custom index.
To visualize the index, we use the plot() function to display the index value on the chart. Traders can observe the custom index alongside other technical indicators or price action, aiding in decision-making and market analysis.
By building a custom index with 10 securities in TradingView, traders gain a consolidated view of the performance of these chosen assets. This allows for easier tracking of sector trends, evaluation of specific strategies, and the ability to compare the performance of individual portfolios against the broader market.
Conclusion:
TradingView's Pine Script provides traders and investors with a flexible solution to build custom indices. By defining the 10 individual securities, calculating the index value, and plotting it on the chart, traders can monitor the collective performance of these chosen assets. Custom indices offer insights into sector performance, enable the evaluation of specific strategies, and provide a benchmark for comparing portfolio performance. By harnessing the power of custom indices in TradingView, traders can enhance their decision-making process and gain a competitive edge in the market.
Market Cap - simpleThis is a simple market cap indicator . it allows you to see the actual market cap of a stock, live, on the chart, right next to the stock price.
The indicator uses the data provided by Tradingview to calculate the market cap based on the simple calculation of outstanding shares times the price, at any given time.
The indicator can be used to compare the actual value of a stock at different times when sometimes you might discover that the market cap when the price is low is actually higher than the market cap when the price was high. That scenario might happen when the amount of outstanding shares has been changed as time goes by.
That conclusion is another nice benefit to having the indicator, on top of just having the Market Cap right in front of your eyes, always up-to-date, changing as the price is changing as well.
transparency= the higher the value, the more transparent the indicator will be. this feature allows you to see the indicator if you want to, but not letting it interrupting your chart.
Hope you enjoy it and good luck!
Open Interest Market Facilitation IndexOriginal script from ChartChampions :
Let's start.
This script was created by using Open Interest instead of Volume in the Market Facilitation Index.
Thus, it can make a difference in the Future and CFD Markets.
If your financial instrument is not from these markets, that is, if Open Interest is not used, you can choose Volume.
You can set "FUTURES" and "OTHERS" from the menu.
If you use the Open Interest (FUTURES) option in the menu on 1W bars and defined Future markets, it will not repaint.
This is the best use for Open Interests, as data is extracted from Quandl and CFTC COT reports are published once a week.
Color Change Rules :
In my version :
Green Bars = Green
Fade Bars = Orange
Fake Bars = Blue
Squat Bars = Red
To show the difference in the presentation, both the Futures option using Open Interest and the Others option using Volume were published to compare.
You can observe the difference.
Best regards.
Market Type IdentifierHelps to evaluate if a market is crypto, forex or stocks. Useful if you want to use specific Ichimoku settings or certain moving averages without having to manually change the settings. This is mostly provided for other Pinescript coders, so will not be useful as a standalone indicator
Market Facilitation Index - MFIUsing Market Facilitation Index - MFI you will be able to recognise two important metrics:
Whether the current trend is strong enough to trade it.
When a new trend may start.
MFI combines changes in price (range) and volume. Here is the formula:
MFI = (High – Low) * Volume
The indicator has bars of four colours. Each colour has a specific meaning and shows how the market responds to a change in volume.
Green. A green bar forms in the situation that both MFI and the volume are up. It means that more and more traders join the market in the current direction. In other words, it points to a strong trend, so you can open trades in line with this trend.
Brown. A brown bar appears when both MFI and the volume decline. It is also called “fade”. It signals that traders are hesitating and don’t want to continue the trend anymore. As a result, it’s not recommended to join the trend. Several brown bars are a sign of the potential reversal of the trend.
Blue. A blue bar forms when MFI increases, but the volume declines. A spike in price may be short-lived a precede a change in the trend. Blue bars appear at the times when newbies enter the trend, but professional traders know that it’s already too dangerous.
Pink. A pink bar, also known as squat, appears when MFI is diminishing, but the volume is growing. It reflects an increase of trading interest and an active fight between buyers and sellers. After one of the sides wins, the price will likely make a big move breaking support or resistance levels. The MFI, however, can’t be used to determine the direction of the breakout.
Market Facilitaion Index (coded by NGH)The indicator endeavors to establish the effectiveness of price movement by computing the price movement per volume unit. This is accomplished by subtracting the days low from the high and dividing the result by the total volume.
More info : en.wikipedia.org
Market Facilitation Index (MFI) The Market Facilitation Index is an indicator that relates price range to
volume and measures the efficency of price movement. Use the indicator to
determine if the market is trending. If the Market Facilitation Index increased,
then the market is facilitating trade and is more efficient, implying that the
market is trending. If the Market Facilitation Index decreased, then the market
is becoming less efficient, which may indicate a trading range is developing that
may be a trend reversal.
Indicator: Market Facilitation Index [MFIndex]
***** NOTE: You may see all GREEN circles (it is due to a recent TV update). To work around this issue, change the "Circles" to "Cross" via Format -> Style *****
Market Facilitation Index, by Bill Williams, plots the effectiveness of price movement by computing the price movement per volume unit.
4 possible combinations of MFIndex and Volume are:
Green :
---------------------------------
MFIndex increases and the volume increases. This means that the amount of participants entering the market increases, therefore the volume increases and the fresh incoming players align their positions in the direction of candlestick growth.
Fade :
------------------------------
MFIndex falls and volume falls. It means that the market participants are indifferent and the price movement is small on small volumes. This usually happens at the end of a trend.
Fake :
------------------------------
MFIndex increases, but the volume falls. It is highly likely that the market is being supported by broker speculation and not any significant client volume.
Squat :
--------------------------------
MFIndex falls, but the volume increases. In this particular situation bulls and bears are fighting between themselves to see who will dominate the next trend. These battles are noticeable by the large sell and buy volumes. However, the price does not change appreciably since the strengths are equal. One of the competing parties either the buyers or the sellers will ultimately triumph in the battle. Usually, the fracture of such a candle indicates if this particular candle determines the continuation of the trend, or terminates the trend.
More info: en.wikipedia.org
Code: pastebin.com