CCI Divergence bar on normal CCI chart

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #167641 quote
    segie
    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
    Nicolas
    Keymaster
    Master

    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
    segie
    Participant
    Senior

    Thank you

    #167733 quote
    segie
    Participant
    Senior

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

    #167735 quote
    Nicolas
    Keymaster
    Master

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

    #167822 quote
    segie
    Participant
    Senior

    10.3

    #167847 quote
    Nicolas
    Keymaster
    Master

    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
    segie
    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
4 years, 9 months ago.

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