ADX Indicator Code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #84740 quote
    roosroos
    Participant
    New

    Hi PRT, I was wondering if it is possible to see and play around with the default code on an indicator in ProBuilder – I am keen to see the exact logic and how it has been coded. For example I was wanting to see what the code behind your default ADX indicator is please?

    Thanks

    #84774 quote
    NicolasNicolas
    Keymaster
    Legend

    The ADX code is available as an example in the platform, here it is:

    p=14
    
    REM Let's compute +DM & -DM
    
    plusDM = max(high-high[1], 0)
    minusDM = max(low[1]-low, 0)
    
    IF plusDM > minusDM THEN
    minusDM = 0
    ENDIF
    
    IF plusDM < minusDM THEN
    plusDM = 0
    ENDIF
    
    IF plusDM = minusDM THEN
    plusDM = 0
    minusDM = 0
    ENDIF
    
    REM Let's compute the directional indicators
    
    plusDI = wilderAverage[p](plusDM)
    minusDI = wilderAverage[p](minusDM)
    
    REM Let's compute the ADX indicator
    
    DX = ABS(plusDI - minusDI) / (plusDI + minusDI) * 100
    myADX = wilderAverage[p](DX)
    
    RETURN  myADX as "ADX", 25
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

ADX Indicator Code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
roos @roos Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
7 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/13/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...