PRTBANDSUP

Category: Indicators

PRTBANDSUP is a function in ProBuilder language used to retrieve the upper band of the PRT Bands, which is a technical indicator often used to determine the volatility and potential price levels that might act as support or resistance. This function is particularly useful in trend analysis and trading strategies to identify potential breakout points.

Syntax:

PRTBandsUp

Example Usage:

This example demonstrates how to use the PRTBANDSUP function to detect a trend change from bearish to bullish. It changes the background color of the chart based on the trend direction.


up = PRTBandsUp
dn = PRTBandsDown

if close crosses over up and trend <= 0 then
    trend = 1 // Set to bullish trend
    r = 0
    g = 255
elsif close crosses under dn and trend >= 0 then
    trend = -1 // Set to bearish trend
    r = 255
    g = 0
endif

signal = trend <> trend[1] // Check for trend inversion
backgroundcolor(r, g, 0, 50) // Set background color based on trend

return signal style(histogram) as "trend inversion", trend coloured(r, g, 0) as "trend direction"

Additional Example:

This example shows how to plot an upward arrow below the candlestick when the close price crosses over the upper PRT Band.


a = PRTBandsUp

if close crosses over a then
    drawarrowup(barindex, low - averagetruerange[14] / 2) coloured(0, 255, 0)
endif

return

Additional Information:

  • The PRTBandsUp function is typically used in conjunction with PRTBandsDown to analyze the full range of the PRT Bands.
  • It is important to understand the concept of trend analysis and how prices interacting with upper and lower bands can indicate potential changes in market conditions.
  • This function can be integrated into various trading strategies, especially those focused on volatility and breakout trading.

Related Instructions:

  • PRTBANDSDOWN indicators
  • PRTBANDSMEDIUMTERM indicators
  • PRTBANDSSHORTTERM indicators
  • Logo Logo
    Loading...