how to know BarIndex at Higest[N](indicator)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #95077 quote
    SLSL
    Participant
    New

    Hello all,

    Happy to be here again!

    I am sorry,  please help to point to the link if this question had been asked before 🙂

    Is there a way in ProRealCode to get the BarIndex  when using Highest or Lowest functions…

    for example:

    x = Highest[60](Close[1])

    y = ???   I want to know “y” the BarIndex position where x happen.

    Thank you very much any help.  Have a nice weekend.  :))

    #95080 quote
    VonasiVonasi
    Moderator
    Master

    Post moved to Probuilder forum as this is a more relevant forum for this question than the Welcome New Members forum. Please try to post in the correct forum with future topics.

    You can try this:

    period = 60
    
    hh = highest[period](high)
    hhindex = 0
    for a = 0 to period - 1
    if high[a] = hh then
    hhindex = barindex[a]
    break
    endif
    next
    
    return hhindex
    #95094 quote
    SLSL
    Participant
    New

    Vonasi,

    Thank you very much.

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

how to know BarIndex at Higest[N](indicator)


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
SL @sl Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/30/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...