Figured seems not that easy to count upTicks vs. downTicks per Bar and reset counter on every new bar.

Surely, continuesly counting is somewhat easy....

function tick()
{
shift(closeTick, priceClose(), 2); // shift the series

if(closeTick[0] > closeTick[1]){
upTick += 1;
return upTick;
}

if(closeTick[0] < closeTick[1]){
downTick += 1;
return downTick;
}
}


Somebody has an idea to approach that?