250 Day High Indicator

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #62621 quote
    lunchis4wimpslunchis4wimps
    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
    NicolasNicolas
    Keymaster
    Legend

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

    #62626 quote
    lunchis4wimpslunchis4wimps
    Participant
    New

    Hi Nicolas

    Yes, highest high or highest close.

    Many thanks

    #62633 quote
    NicolasNicolas
    Keymaster
    Legend

    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
    highest-high-bar-counts.png highest-high-bar-counts.png
    #62638 quote
    lunchis4wimpslunchis4wimps
    Participant
    New

    That’s great Nicolas. Thank you very much.

    #62644 quote
    lunchis4wimpslunchis4wimps
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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 NicolasNicolas
8 years, 7 months ago.

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