Editors' picks
OPEN-SOURCE SCRIPT

RedK Trader Pressure Index (TPX v1.0)

Updated
Quick Summary
---------------------
The RedK Trader Pressure Index (REDK_TPX) analyzes the changes in price bars to give the trader a clear visual insight that represents the ongoing fight between the bulls (buyers) and bears (sellers) in the market - to determine who is in control of the price action, which in turn can be helpful in a trader’s decision about how the price action may be unfolding, what type of trade and positions to take (or to close) and when is the ideal time to action.

How the TPX calculation works
---------------------------------------
The TPX uses a simple logic and that’s one of the things I like about it – there is no complex calculation or magic stuff - and the core idea makes sense to me, as well as being one of the ways I needed to analyze my price charts.

The underlying assumption is that the buyers and sellers are competing for control of the market at all time.
- if there’s more buyers than sellers in the market, and if the buyers’ (or bull) pressure is stronger (than the sellers’), they will be able pull the “price range” up – and that means that on the price chart we can expect to see an increase in value in both the “high” and the “low” of the next price bar.

- Similarly, if there’s more sellers than buyers in the market, and if the sellers’ (or bear) pressure is stronger (than the buyers’), they will be able push the “price range” down – on the price chart we can expect to see a decrease in value in both the “high” and the “low” of the next price bar.

So, we will use the change in high and low price, between 2 consecutive price bars, as a proxy for the bull and bear “pressures” – a (weighted) moving average of these “pressure” values are then calculated along with the “Net Pressure” – the final results are plotted.

The importance of the "Control Level"
-----------------------------------------------
As in similar price-action based indicators, there’s a certain threshold or “control level”, above which, the pressure becomes “dominant”

when the bull or bear pressure is above that threshold, they will dominate and control the price move – this level can be found around the 25 or 30. I have included the ability to plot and adjust that control level in the TPX’s settings – and I also show some examples in the chart above (weekly chart for MSFT)

The code is commented and the chart is annotated to explain how to “read” the TPX – and how to interpret the values on the price chart

Using the Trader Pressure Index (TPX) in trading
------------------------------------------------------------
  • TPX can be valuable in showing well-supported (up or down) price moves that may lead to a strong trend that we can ride (when the pressure value is above the control level) - see exampled above

  • TPX is also valuable in showing when there’s “lack of interest” from the buyers or the sellers (or both) – which is great in exploring chub or no-trade zones - so basically when to avoid trading.

  • As usual, it's always recommended to use these types of "price action insight" indicators in conjunction with other trend and momentum indicators (moving averages, MACD..etc), so the insight we gain from them can be properly placed within the broader "context" - and to receive additional confimtion signals to support the trading decision.


I will come back later to post something about how the TPX differs from my recently-posted Strength of Movement (SoM) because they wok completely differently but can be used together with great synergy – and also how the TPX compares to the classic DMI/ADX which uses a similar concept.

Please feel free to integrate in your trading – hope you find this useful - comments and feedback are always welcome

Release Notes
- v2 adds couple of minor changes
1. protect against gaps causing bulls or bears pressure shooting above 100% (although the averaging took care of these)
2. replace the "transp=" keyword from plots to be "Pine future-proof"
Release Notes
TPX v3.0 adds few usability improvements:
- Smoothed Bull / Bear pressure "mountains" by introducing a "pre-smoothing" option - which is applied on the average bull / bear pressure *before* the Net Pressure is calculated
** this produces a smoother plot - be aware that (like any smoothing) this option will cause a slight signal lag (1 bar for a value of 3 or 4 pre-smoothing)
** this pre-smoothing option will be turned off by default - pre-smoothing value can be adjusted from the settings - default is 3
** also be aware that when pre-smoothing is turned on, the Net Pressure will in effect be "double-smoothed"
- some further coding clean-up
- precision brought down to 1 to simplify value display & interpretation - no impact to calculations

here's how TPX v3 with the new pre-smoothing turned on compares to TPX v2.0 which had no pre-smoothing
snapshot
Release Notes
RedK Trader Pressure Index (TPX) v4.0 adds couple of new features:
- new "Dominant Pressure Signal" - that will show up as crosses (or circles) as the pressure of bulls (or bears) is equal to or exceeds the user's control / dominance level
-- this plot acts as an additional "visual signal" - it will be off by default - user needs to turn it on in settings - and can also adjust the level these signals are plotted on to further customize the TPX

- added alerts: to be set using the "Set Alert" function in TV. This will enable TPX to trigger a user alert when bulls or bears are in control (level >= control level)

This is how the TPX v4 looks like with all options enabled.
I hope these updates are valuable - feel free to leave me a comment below

snapshot
Release Notes
A quick update to TPX v5.0 :
- Code upgraded to Pine v5.0
- Added alert for when the Net Pressure swings around the 0 line (Changes color = changes mode from net positive to net negative or vice versa)
ADXAverage Directional Index (ADX)Centered OscillatorsDMIredkredk_tpxtradepressureindex

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer