REF function in PI software is not working as per expectation

Hi ,


I have a very basic script(REF(low, 1) < REF(low, 2)) which is not working as per my expectation .

This is just one script i mentioned but i tried may scripts using REF , many scripts are behaving in this way which i don't understand. 

Please let me know whether my understanding for REF function is wrong or its a bug in software.

1 Like

The REF function is used whenever you want to reference a value at any specific
point in a vector.

as per script

REF(LOW,1) < REF(LOW,2)

It is the Defining Reference of previous candle low is less than Reference of previous 2nd candle low

Thank you for the response, I understood the concept. But the output is not expecting as per my expectation . Today I tried the same script with same stock which is giving correct result. I think there must be some bug which got fixed recently or may be some problem in market hour.