Screener can be run while a bar is being built, so when I refer to CLOSE[0] it is the current price (the one that would be considered CLOSE at execution time) or is ALWAYS a reference to the previous BAR closed BEFORE the current one?
Example:
x = 0
IF close[0] > close[1] THEN
x = 1
ENDIF
RETURN x
is either:
a) the previous closed BAR compared to the second previous closed BAR;
or
b) the current (not yet closed) BAR compared to the previous closed BAR?
Thank you.
Hi Robert
It’s b), but at any instant of a bar the price is Close(0) so if the instantaneous / current price > Close(1) (previous bar Close) then the Screener will pull as meeting criteria.
Good question, glad you asked!
Btw you need below (in place of return x) to make a Screener.
Screener [x]
Cheers
GraHal