OPEN-SOURCE SCRIPT
TradeQUO Herrick Payoff RSI

Herrick Payoff Index RSI (HPI-RSI) with Signal Line
An advanced oscillator that measures market strength not just by price, but by "smart money flow."
This indicator is not a typical RSI. Instead of applying the Relative Strength Index to price alone, it calculates it on the cumulative Herrick Payoff Index (HPI). This creates a unique oscillator that reflects the underlying sentiment and capital flow in the market.
What is the Herrick Payoff Index (HPI)?
The HPI is a classic sentiment indicator that combines three crucial elements to determine if money is flowing into or out of an asset:
By combining these factors, the HPI provides a more comprehensive picture of market strength than indicators based solely on price.
How This Indicator Works
The script follows a logical, multi-step process:
Interpretation and Application
You can use this indicator much like a standard RSI, but with the added context of money flow:
Settings
The indicator has been deliberately kept simple:
An advanced oscillator that measures market strength not just by price, but by "smart money flow."
This indicator is not a typical RSI. Instead of applying the Relative Strength Index to price alone, it calculates it on the cumulative Herrick Payoff Index (HPI). This creates a unique oscillator that reflects the underlying sentiment and capital flow in the market.
What is the Herrick Payoff Index (HPI)?
The HPI is a classic sentiment indicator that combines three crucial elements to determine if money is flowing into or out of an asset:
- Price Change: The direction and momentum of the market.
- Trading Volume: The conviction behind the price movement.
- Open Interest (OI): The total number of open contracts (mainly in futures), which indicates if new capital is entering the market.
By combining these factors, the HPI provides a more comprehensive picture of market strength than indicators based solely on price.
How This Indicator Works
The script follows a logical, multi-step process:
- It calculates the raw Herrick Payoff Index for each bar.
- It creates a cumulative sum of this index to generate a continuous money flow value.
- This cumulative value is smoothed with a short-period EMA to reduce noise.
- The RSI is then applied to this smoothed HPI value.
- An additional, configurable signal line (moving average) is added to facilitate trading signals.
Interpretation and Application
You can use this indicator much like a standard RSI, but with the added context of money flow:
- Overbought/Oversold: Values above 70 suggest an overbought condition, while values below 30 signal an oversold condition.
- Signal Line Crossovers: A cross of the HPI-RSI line above the signal line can be seen as a bullish signal. A cross below can be seen as a bearish signal.
- Divergences: Look for divergences between the indicator and the price. A bullish divergence (price makes a lower low, indicator makes a higher low) can indicate an upcoming move to the upside. A bearish divergence (price makes a higher high, indicator makes a lower high) can signal a potential move to the downside.
Settings
The indicator has been deliberately kept simple:
- HPI Smoothing Length: Smoothing length (1-5) for the cumulative HPI.
- RSI Length: The lookback period for the RSI calculation.
- Signal Line Settings: Here you can enable/disable the signal line and customize its type and length.
- Display Settings: Adjust the colors of the RSI and signal lines to your preference.
This indicator is a tool for analysis and should always be used in combination with other methods and a solid risk management strategy. Happy trading!
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。