Need To Count Bars since last Time Price Was Traded

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #114515 quote
    NobodyNobody
    Participant
    Veteran

    Struggling to work this one out , Want to count the bars since the LOW of current bar was last traded at  .  Any help or guidance appreciated as i just cant get a grasp on it  .

    #114516 quote
    NobodyNobody
    Participant
    Veteran

    Struggling to work this one out , Want to count the bars since the LOW of current bar was last traded at . Any help or guidance appreciated as i just cant get a grasp on it .

    Here is an indication of what i am trying to measure , hope it helps  … I have no idea why but i cannot attach a file atm

    ScreenShot1096.jpg ScreenShot1096.jpg
    #114521 quote
    VonasiVonasi
    Moderator
    Master

    This will return the count of bars since the current candles low was last seen.

    count = 0
    
    for a = 1 to barindex
    count = count + 1
    if low[a] <= low then
    break
    endif
    next
    
    return count
    Nobody thanked this post
    #114527 quote
    NobodyNobody
    Participant
    Veteran

    Appreciate that , thank you very much  .

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

Need To Count Bars since last Time Price Was Traded


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Nobody @brisvegas Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by NobodyNobody
6 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/09/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...