the reference valuewhen(cond, source, occurrence): the value of source the n-th most recent time cond was true, counting the current bar. Occurrence 0 is the latest.
valuewhen(cond, source, occurrence)
source
cond
the reference
valuewhen(cond, source, occurrence): the value ofsourcethe n-th most recent timecondwas true, counting the current bar. Occurrence 0 is the latest.