250 Day High Indicator

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #62621 quote
    lunchis4wimps
    Participant
    New

    Wondering if anyone could help out with code for an indicator that tells you the number of bars between 250 day highs?

    Many thanks

    #62622 quote
    Nicolas
    Keymaster
    Master

    You mean the count of bars between the last 2 different 250 days highest high?

    #62626 quote
    lunchis4wimps
    Participant
    New

    Hi Nicolas

    Yes, highest high or highest close.

    Many thanks

    #62633 quote
    Nicolas
    Keymaster
    Master

    This is the code, change “price” variable with either Close or High or anything else 🙂

    price = high
    
    hh = highest[250](price)
    
    if hh<>hh[1] then 
     count=0
    else
     count=count+1
    endif
    
    return count
    lunchis4wimps thanked this post
    #62638 quote
    lunchis4wimps
    Participant
    New

    That’s great Nicolas. Thank you very much.

    #62644 quote
    lunchis4wimps
    Participant
    New

    Hi Nicolas,

    Any idea why Prorealtime won’t let me use the indicator as my sorting criteria in a screener? It just puts 255 for every security.

    Many thanks

    #62654 quote
    Nicolas
    Keymaster
    Master

    Proscreener has a limitation of 254 bars of history.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

250 Day High Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Nicolas
7 years, 12 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/13/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...