INVITE-ONLY SCRIPT

TanHef Ranks

Updated
TanHef Ranks: A numeric compass to market tops and bottoms.

█ Simple Explanation:
This indicator is designed to signal 'buy low and sell high' opportunities through numerical rankings, where larger numbers represent stronger signals. These numbered rankings are negative for potential ‘buy’ opportunities and positive for possible ‘sell’ moments.

█ Understanding Numerical Rankings:
The numerical rankings (from +18 to -18) identify and take advantage of market tendencies of prices reverting back to their historical average, also known as mean reversion. It operates on a simple principle: smaller values signal a potential for short-term mean reversion, while larger values suggest a probable shift in both short and long-term mean reversion. These values are derived from a careful analysis of both short and long-term mean reversions, providing traders with a nuanced understanding of market movements.

█ Analyzing Numeric Ranking Extremes:
The historical occurrences of numeric rankings are recorded into a table to help identify the previous extreme rankings (for example anything -10/+10 is considered extreme), which historically signal key turning points in market movements. The previously extreme rankings offer insights into potential end-of trend scenarios or trend reversals, thereby attempting to make high-probability trading decisions.

█ Risk Management Integration:
This indicator combined with disciplined risk management, offers a more secure trading approach. Applying a stop-loss near lows after entries on the oversold side (negative rankings) protects from large losses. Additionally, once prices reach overbought territories (positive rankings) applying a tight stop-loss helps to lock in profits while continuing exposure to the aggressive upwards momentum.

█ Calculation Methodology:
The indicator evaluates market momentum by analyzing upward and downward movements. It does this by referencing the 10 'length' input parameters, where 'length' refers to the number of price bars referenced. Each 'length' increases in value to analyze trends from short to long-term. A numerical rank is given when these trends align, with higher ranks requiring agreement across both short and longer-term lengths. This alignment across different time periods helps to ensure the indicator's signals are robust.

█ Indicator Stability (No Repainting):
When a price bar closes, its associated ranking is fixed and remains unchanged (some other indicators repaint, which means signals can change after a bar closes). While a price bar is open, its numeric ranking may increase in absolute value but never decrease towards zero, ensuring further stability. This stability and consistency is crucial for reliable back-testing and real-time analysis. Notably, in the highly improbable scenario where a ranking may exhibit both a positive and negative value simultaneously during extreme volatility, both the positive and negative numeric ranking is displayed.

█ Practical Application:
  • Pro Tip: Use at a minimum -4/+4 rank as potential basic buy/sell signals. Higher absolute numeric rankings are ideal as they indicate stronger reversal potential due to higher rankings identifying longer period reversals.
  • Entry Scenario: Refer to the chart below. The -9 ranking (3 occurrences in the table) indicates potential oversold conditions, suggesting a buy. Add a stop-loss near recent lows to protect against losses.
  • Exit Scenario: Refer to the chart below. The +7 ranking (6 occurrences in the table) indicates potential overbought conditions, suggesting a sell. Place a stop-loss to protect profits and remain exposed to further gains.

https://www.tradingview.com/x/Zkf66of4/

█ Indicator Settings:
  • Additional Timeframe: Allows users to include an extra timeframe's data in the analysis for more nuanced insights.
  • Lengths: Defines the periods over which the indicator calculates its rankings, affecting the sensitivity and time horizon of the signals.
  • Max Number Calculated: Sets the upper limit for the numerical rankings the indicator can output, tuning the extremity of the signals it identifies. (Reducing improves indicator load time)
  • Visual Styling (Current Timeframe): Customizes the appearance of the indicator's output on the chart for the selected timeframe, enhancing visibility and readability.
  • Table Settings: Adjusts the display properties of the table that lists numerical rankings, including its visibility, location, and size on the chart.
  • Indicator Display Type: Selects the mode in which the indicator presents its data, either overlaying the main chart or in a separate pane as an oscillator.
  • Alerts: Configures the conditions and frequency at which the indicator will trigger trading alerts, based on the numeric rankings and user-defined parameters.

https://www.tradingview.com/x/NxXuyje2/

█ How To Access:
You can see the Author's Instructions below to get access.
Release Notes
Added a new default display option for rank occurrences, utilizing a label with a tabulated table for enhanced visualization.

Added an alert option requiring ranks to exceed the previous bar's absolute value.

Added a transparent (invisible) plot usable as a single external indicator source, representing the larger absolute value between overbought and oversold ranks, or zero for absolute equivalents.
Other plots remain unchanged and visible to accommodate the rare occurrence of simultaneous overbought and oversold ranks.

Enhancements have been made to prevent loading errors.
Release Notes
Added the ability to highlight specific levels using a variety of text symbols on both the indicator (oscillator) and price bars (overlay).

Implemented enhancements to prevent loading errors when using higher timeframes for the additional timeframe.

Significantly improved the overall indicator's loading time, especially when no additional timeframe is selected.
bottomscheapexpensivemeanreversionOscillatorsranksreversalriskmanagmenttanhefTOPS

Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact TanHef for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases, you can find a good open-source alternative for free in our Community Scripts.

Author's instructions

Want to use this script on a chart?

Warning: please read before requesting access.

tanhef.com/

Scripts and content from TanHef are solely for information and education. Past performance does not guarantee of future results.
Also on:

Disclaimer