CCI Divergence bar on normal CCI chart

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #167641 quote
    segiesegie
    Participant
    Senior

    Hi,

    There’s a CCI divergence indicator that shows a ‘bar’ when there is divergence.

    Can this same ‘divergence bar’ reflect on a normal CCI (20) indictor as a red/ green ‘dot’ or up/ down arrow?

    Regards,

    Segie

    #167678 quote
    NicolasNicolas
    Keymaster
    Legend

    The below code will plot CCI divergence directly on the CCI curve:

    a = CCI[20](typicalPrice)
    b = DivergenceCCI[20,-100,100,20]
    
    if b<0 then 
    //drawpoint(barindex,a,3)
    drawtext("●",barindex,a,dialog,bold,20) coloured(255,0,0)
    elsif b>0 then 
    //drawpoint(barindex,a,3)
    drawtext("●",barindex,a,dialog,bold,20) coloured(0,255,0)
    endif 
    
    return a,b
    segie thanked this post
    divergences-cci.png divergences-cci.png
    #167732 quote
    segiesegie
    Participant
    Senior

    Thank you

    #167733 quote
    segiesegie
    Participant
    Senior

    Receiving syntax error on line 2. On the ‘commas’

    #167735 quote
    NicolasNicolas
    Keymaster
    Legend

    The above code works only with PRT v11, what version are you using?

    #167822 quote
    segiesegie
    Participant
    Senior

    10.3

    #167847 quote
    NicolasNicolas
    Keymaster
    Legend

    There’s a CCI divergence indicator that shows a ‘bar’ when there is divergence.

    Ok, so you are obviously using a custom indicator, but how to know which one? Could you guide me please?

    #168237 quote
    segiesegie
    Participant
    Senior

    Looking to combine the standard CCI and CCI divergence indicators found under “Indicators and Trading Systems” on the 10.3 platform

    #168276 quote
    NicolasNicolas
    Keymaster
    Legend

    Ok, so the above code is using the default CCI divergence indicator available in the platform, but with a specific instruction introduced in PRT v11.

Viewing 9 posts - 1 through 9 (of 9 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

CCI Divergence bar on normal CCI chart


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 8 replies,
has 2 voices, and was last updated by NicolasNicolas
5 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/20/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...