returning number of days since event

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #88786 quote
    longboarder
    Participant
    New

    Hi

    I am trying to identify the number of days since an event occurred in  Pro Screener. i.e I want to identify a moving average cross over that occurred anytime within the previous (x) periods.

    It seems that I need to use the Barindex function, but I don’t seem to fully understand the syntax to make it work properly. Can anyone provide some guidance for me??

     

    Thanks

    #88805 quote
    Vonasi
    Moderator
    Master

    BARINDEX just gives each candle an identifying number – it indexes them for ease of finding later. The first candle on a chart is 1 and the second is 2 right up until the latest candle which would be 500 if there were 500 candles on a chart.

    So just save the BARINDEX value when a cross occurs and then BARINDEX minus that value tells you how many candles ago the last cross occurred.

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

returning number of days since event


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
7 years, 8 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/16/2019
Status: Active
Attachments: No files
Logo Logo
Loading...