DIplus

Category: Indicators

The DIplus function is part of the Average Directional Index (ADX) technical indicator, specifically representing the Positive Directional Indicator (+DI). This function is used to measure the strength of an upward price movement and is often used in conjunction with its counterpart, DIminus, to assess the overall trend strength and direction in a market.

Syntax:

DIplus[N](price)

This syntax represents the DIplus function where N is the period over which the indicator is calculated, and price refers to the price type (e.g., close, open, high, low) used in the calculation.

Example:

minus = DIminus[14](open)
plus = DIplus[14](open)
IF(minus > plus AND minus[1] < plus[1]) THEN
    bull = 1
    bear = 0
ENDIF
IF(minus < plus AND minus[1] > plus[1]) THEN
    bull = 0
    bear = -1
ENDIF
RETURN bull, bear

In this example, the DIplus and DIminus functions are calculated using a 14-period setting based on the ‘open’ price. The script then checks for crossovers between the DIminus and DIplus lines to determine bullish or bearish signals. If DIminus crosses above DIplus from below, it sets a bullish signal (bull = 1, bear = 0). Conversely, if DIminus crosses below DIplus from above, it sets a bearish signal (bull = 0, bear = -1).

  • The DIplus function helps traders identify periods of strong upward price momentum.
  • It is crucial to use DIplus in conjunction with DIminus to fully understand market trends.
  • Adjusting the period N can affect the sensitivity of the indicator to price movements.

This function is essential for traders who utilize technical analysis to make informed decisions based on trend strength and direction.

Related Instructions:

  • ADX indicators
  • ADXR indicators
  • DIminus indicators
  • Logo Logo
    Loading...