Cycle

Category: Indicators

The Cycle function in ProBuilder language is used to analyze the cyclical components within a trading price series. This function helps in identifying potential cyclical patterns which can be crucial for forecasting and trading decisions. The Cycle function is particularly useful in technical analysis where understanding the periodic nature of markets can provide a competitive edge.

Syntax:

Cycle(price)

Example:

c = Cycle(close)
IF c > 0 THEN
    Bullish = 1
    Bearish = 0
ELSE
    Bullish = 0
    Bearish = -1
ENDIF
RETURN Bullish coloured(0,128,0), Bearish coloured(255,20,147)

In this example, the Cycle function is applied to the closing prices of a stock or other financial instrument. The result, stored in variable c, is then used to determine whether the market condition is bullish or bearish. If the cycle value c is greater than 0, it suggests a bullish market condition, otherwise, it suggests a bearish condition. The results are then returned with specific colors for visual distinction in charts: green for bullish and pink for bearish conditions.

  • The Cycle function calculates the cyclical component of the price series, which can be useful in identifying repetitive patterns over time.
  • The function takes one argument, price, which should be a series of prices (e.g., close, open, high, low).
  • The output of the Cycle function can be used to set trading strategies or to visually analyze the market’s behavior.

This function does not predict market direction but rather highlights the cyclical nature of price movements, which can be an essential factor in comprehensive market analysis.

Logo Logo
Loading...