The Repulse indicator is a technical analysis tool used in the ProBuilder language to measure and display the bullish or bearish pressure exerted by traders on each candlestick. It is particularly useful for identifying the underlying momentum in the market and can help in determining potential trend reversals or continuations.
Repulse[n](price)
This function calculates the Repulse indicator over the last n periods for a given price. Here, n represents the number of periods you want to analyze, and price can be any valid price series such as close, open, high, or low.
i1 = Repulse[10](close)
IF i1 > 0 THEN
bullish = 1
bearish = 0
ELSIF i1 < 0 THEN
bullish = 0
bearish = 1
ENDIF
RETURN bullish coloured(127,255,0), bearish coloured(255,64,64)
In this example, the Repulse indicator is calculated over the last 10 periods based on the closing prices. If the result (i1) is positive, it suggests bullish pressure, and the script sets bullish to 1 and bearish to 0. Conversely, if i1 is negative, it indicates bearish pressure, setting bullish to 0 and bearish to 1. The final line returns these values with specific colors for visual representation on the chart.
Understanding the Repulse indicator can provide traders with a deeper insight into market dynamics, helping to optimize entry and exit points in trading strategies.