NR7-Code help

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #128184 quote
    kumar_AK
    Participant
    Junior

    Hi,

    I am trying to plot a dot on Daily chart by identifying the NR7.

    can somebody help.

    source is from the link (https://www.prorealcode.com/prorealtime-market-screeners/nr7-pattern-screener/)

    // if you only need for example the last 50 bars dotted, uncomment next line
    //DEFPARAM CalculateOnLastBars=50
     
    c1= Range<Range[1] and Range<Range[2] and Range<Range[3] and Range<Range[4] and Range<Range[5] and Range<Range[6] and Range<Range[7]
    
    // dot value
    dotval=c1 + c1*0.03
     
    // the red, green, blue values of RGB colour
    R=0
    G=0
    B=255
     
    // printing
    // instead of keyboards dot you can use "•" or "●"
    DRAWTEXT("•",barindex,dotval,Dialog,Bold,12) coloured(R,G,B)
     
    RETURN dotval
    #128190 quote
    robertogozzi
    Moderator
    Master

    There you go:

    // if you only need for example the last 50 bars dotted, uncomment next line
    //DEFPARAM CalculateOnLastBars=50
     
    c1= Range<Range[1] and Range<Range[2] and Range<Range[3] and Range<Range[4] and Range<Range[5] and Range<Range[6] and Range<Range[7]
     
    // dot value
    dotval=low * 0.995
     
    // the red, green, blue values of RGB colour
    R=0
    G=0
    B=255
     
    // printing
    // instead of keyboards dot you can use "•" or "●"
    IF c1 then
       DRAWTEXT("•",barindex,dotval,Dialog,Bold,12) coloured(R,G,B)
    endif
    RETURN c1
    kumar_AK thanked this post
    #128200 quote
    Vonasi
    Moderator
    Master

    You might also be interested in this indicator. It counts back p bar to see how many previous bars in a row the range is bigger than or smaller than. It then displays this as either a green number for bigger range than the previous x bars in a row or a red number for smaller range than the previous x bars in a row.

    You can turn on or off the Smallest Range or Largest Range if you only want to see one of them.

    You can also set a MinP so no values below this setting are displayed.

    Don’t set P too high or you are likely to get infinite loop errors.

    //Biggest Range and Smallest Range Since x Bars Indicator
    //By Vonasi
    //Date: 20200426
    
    //p = 600
    //LargetsRange = 1
    //SmallestRange = 1
    //MinP = 7
    
    if high<>low then
    if smallestrange then
    lowcount = 0
    for a = 1 to p
    if Range<Range[a] then
    lowcount = lowcount + 1
    else
    break
    endif
    next
    if lowcount <> 0 and lowcount >= minp then
    drawtext("#lowcount#",barindex,high*1.005,sansserif,bold,10)coloured(128,0,0)
    endif
    endif
    endif 
    
    if largestrange then
    highcount = 0
    for a = 1 to p
    if Range>Range[a] then
    highcount = highcount + 1
    else
    break
    endif
    next
    if highcount <> 0 and highcount >= minp then
    drawtext("#highcount#",barindex,high*1.005,sansserif,bold,10)coloured(0,128,0)
    endif
    endif
    
    return
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

NR7-Code help


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
kumar_AK @kumar_ak Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Vonasi
5 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/26/2020
Status: Active
Attachments: No files
Logo Logo
Loading...