returning number of days since event

Forums ProRealTime English forum ProScreener support returning number of days since event

Viewing 2 posts - 1 through 2 (of 2 total)
  • #88786

    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

    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)

Create your free account now and post your request to benefit from the help of the community
Register or Login