TradingView
PHVNTOM_TRADER
25 אוק׳ 2022 08:46

UFO + Realtime Divergences (UO x MFI) 

Bitcoin / TetherUSBinance

תיאור

UFO + Realtime Divergences (UO x MFI) + Alerts

The UFO is a hybrid of two powerful oscillators - the Ultimate Oscillator (UO) and the Money Flow Index (MFI)

Features of the UFO include:

- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur, as well as centerline crossovers.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the oscillator has crossed its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- 2x MTF triple-timeframe Stochastic RSI overbought and oversold confluence signals painted at the top of the panel for use as a confluence for reversal entry trades.

The core calculations of the UFO+ combine the factory settings of the Ultimate Oscillator and Money Flow Index, taking an average of their combined values for its output eg:

UO_Value + MFI_Value / 2

The result is a powerful oscillator capable of detecting high quality divergences, including on very low timeframes and highly volatile markets, it benefits from the higher weighting of the most recent price action provided by the Ultimate Oscillators calculations, as well as the calculation of the MFI, which incorporates volume data. The UFO and its incorporated 2x triple-timeframe MTF Stoch RSI overbought and oversold signals makes it well adapted for low timeframe scalping and regular divergence trades in particular.


The Ultimate Oscillator (UO)

Tradingview describes the Ultimate Oscillator as follows:

“The Ultimate Oscillator indicator (UO) is a technical analysis tool used to measure momentum across three varying timeframes. The problem with many momentum oscillators is that after a rapid advance or decline in price, they can form false divergence trading signals. For example, after a rapid rise in price, a bearish divergence signal may present itself, however price continues to rise. The Ultimate Oscillator attempts to correct this by using multiple timeframes in its calculation as opposed to just one timeframe which is what is used in most other momentum oscillators.”

You can read more about the UO and its calculations here


The Money Flow Index ( MFI )

Investopedia describes the True Strength Indicator as follows:

“The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume data for identifying overbought or oversold signals in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100. Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .”

You can read more about the MFI and its calculations here


The Stochastic RSI (relating to the built-in MTF Stoch RSI feature)

The popular oscillator has been described as follows:

“The Stochastic RSI is an indicator used in technical analysis that ranges between zero and one (or zero and 100 on some charting platforms) and is created by applying the Stochastic oscillator formula to a set of relative strength index ( RSI ) values rather than to standard price data. Using RSI values within the Stochastic formula gives traders an idea of whether the current RSI value is overbought or oversold. The Stochastic RSI oscillator was developed to take advantage of both momentum indicators in order to create a more sensitive indicator that is attuned to a specific security's historical performance rather than a generalized analysis of price change.”

You can read more about the Stochastic RSI and its calculations here


How do traders use overbought and oversold levels in their trading?

The oversold level, that is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at an overbought level as a confluence for entry into a short position, and the Stochastic RSI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI .


What are divergences?

Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.

There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.

Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.


How do traders use divergences in their trading?

A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.

Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.

When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.

Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.


Setting alerts.

With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.


Configurable pivot period.

You can adjust the default pivot lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.


Disclaimer: This script includes code from the stock UO and MFI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.

הערות שחרור

- Refactored the MTF Stoch RSI confluence signal code to save height space on the panel.
- Added a an option for users to select where the MTF Stoch RSI Triple timeframe signal are positioned, Top, Bottom, or Absolute. Default set to Top.

הערות שחרור

- Corrected the MTF Stoch RSI ribbon signal code
- Adjusted the default secondary set of MTF triple-timeframe confluences to use 15m + 30m + 120m timeframes by default.

הערות שחרור

- Adjusted the MTF Stoch RSI code.
- Differentiated the colors of MTF#1 from MTF#2 for Stoch RSI overbought / oversold signals.

הערות שחרור

- Added a feature to optionally fade out the oscillator behind the most recent history.
- Updated the chart image.
- Defaulted the Range bands to disabled.

הערות שחרור

- Updated chart image

הערות שחרור

- Added a 'Flip oscillator' feature into the settings for use with the Tradingview 'Flip chart' (Alt+i) feature, so both the chart and the oscillators can be flipped upside down to help see the opposite scenario for traders who have too one-sided a bias.
- Reorganised the settings menu to place the common settings at the top.

הערות שחרור

- Added a 'flipped' warning label to the oscillator panel to show when the osc is flipped.

הערות שחרור

- Added an additional set of MTF signals for a triple timeframe CCI, in additional to the existing triple timeframe MTF Stoch RSI, both showing MTF overbought and oversold periods.
- Added optional text label to panel to notify when either MTF CCI or MTF Stoch RSI reach overbought or oversold. Disabled by default.
- Adjusted the default MTF signal position to be 'Absolute' which places the MTF signals at the bottom of the panel, clear away from the oscillator itself.
- Added optional bar/candle coloring option for the MTF signals. Disabled by default.
- Enabled the centerline by default.
- Disabled the 'Fadeout oscillator' Feature by default.

הערות שחרור

- Removed the unused source input option from pivot period settings.

הערות שחרור

- Corrected the alert message text.
- Fixed the text label shown when osc is in 'Flip oscillator' mode, or optionally when MTF Stoch RSI / CCI confluences are met.

הערות שחרור

- Added option to customise oscillator colour into settings menu.

הערות שחרור

- Updated alerts so that multiple alerts are not triggered per instance of MTF or divergence signals.
- Enabled the highlight overbought and oversold highlight on oscillator by default.
- Removed the centerline crossover alerts.

הערות שחרור

- Fixed the MTF overbought/oversold alerts so they include the MTF CCI ob/os as well as the existing MTF Stoch RSI ob/os signals.
- Named and grouped alerts together more clearly.

הערות שחרור

- Removed the auto adjust pivot period for selected chart timeframe feature.

הערות שחרור

- Added a general background colour option.
- Improved the centerline crossunder back ground colour and oscillator colour settings, and default colours.

הערות שחרור

- Grouped all background colour styles in settings menu

הערות שחרור

- Added an optional table to show the values of the Stoch RSI and CCI on each of the timeframes used in the MTF signals. Colour coded values when they reach the defined overbought and oversold threshold levels.

הערות שחרור

- Turned on the MTF OB/OS label by default, added colour-coding to the text, inherited from the configurable OB/OS colours within settings for Stoch RSI and CCI. This tells users which oscillator - CCI or Stoch RSI is adding the signal to the panel, in the event that the colours are not distinct enough, or colour blind users. eg, label will read: "MTF Stoch RSI Overbought" in bottom left corner of panel.

הערות שחרור

- Added a option to select 'Dark' or 'Light' theme mode for MTF table which changes the labels between white/black
- Added a global control to show / hide MTF ribbon signals
- Added an option to include the current timeframe overbought and oversold Stoch RSI signals into the irron, disabled by default.
- Reorganised settings menu.
תגובות
Food_Plus
Bon travail ! Est-il possible d'ajouter une option pour filtrer les divergences dans OB/OS ?
PHVNTOM_TRADER
@Food_Plus, Good idea.

Do you mean MTF overbought and oversold, ie, where 3x timeframes are all overbought or oversold together + div. Or, just overbought and oversold on the one, current timeframe?

My RF+ Divergence Scalping System indicator has a signal to do this. It can alert where there is either MTF CCI or MTF Stoch RSI overbought/oversold on 3 timeframes together - plus - a divergence at that same point, or with a few bars prior. I will consider adding that feature into this indicator, too. If and when I do, I will message you to let you know.

In the meantime, you can always setup alerts on the RF+ Divergence Scalping System to be notified to the MTF overbought/oversold + divergence signals, then remove the indicator if you don't want to use that indicator, and the alerts will still work.

Thanks for the great suggestion! 🙏🏻
Food_Plus
@tvenn, Thank you for answering..
An option to display the divergences in the overbought and oversold zones on the current time scale. 🙏🏻
PHVNTOM_TRADER
@Food_Plus, I see. And are you wanting reversal type setups, ie:

- oversold and bullish div
- overbought and bearish div

Or are you wanting something for hidden divergences?
Food_Plus
@tvenn, Yes I would like to please filter the regular (bull and bear) and hidden (bull and bear) divergences in the overbought or oversold areas. I think the best is that the first pivot is in the overbought or oversold zone and the second pivot is not necessarily in the overbought or oversold zone
PHVNTOM_TRADER


If I were to add a filter for divergences which occur within an overbought or oversold state on the current timeframe into the UFO, I don't think it would filter any out, since they virtually all occur within overbought or oversold Stoch RSI periods.

It may be more effective for you to use the stoch RSI, I have one which you can hide the oscillator itself and simply show the overbought and oversold background colours, then you can reduce the size of the panel to save space, seen at the bottom of my chart image.

Or, my Fantastic Stochastic chart overlay indicator can present the current timeframe overbought and oversold periods as a small ribbon at the bottom of the chart, as also seen in the picture, which would also save space, but give you the info you want.

I will continue to look at the feature you described, I had assumed you'd meant divergences within MTF overbought and oversold periods, which are of course much rarer, and is something I may look to add in, they are very powerful and already included in my RF+ Divergence Scalping System.
PHVNTOM_TRADER
I'm not quite sure when you say overbought and oversold whether you mean on the Stoch RSI, CCI, or the UFO itself? @Food_Plus
Food_Plus
@tvenn, Thank you, if I made this request for the option is that changed the indicators that you use by the Rsi because I took the habitute with the Rsi. I hope you do not blame me ;)

With the rsi, the discrepancies are not only in OB/OS. Is it possible to add this option so that if someone changes the indicator like me ;) will find this option very useful?
PHVNTOM_TRADER
@Food_Plus, I not entirely clear what you want.

If you send me a direct message on Tradingview and explain exactly what you're after, I will try and help further.
Food_Plus
@tvenn, Ok thanks, I can't send messages via tradingview anymore... Do you have a telegram?
עוד