crossDirection
Documentation / @elitechart/core / crossDirection
Defined in: alerts/alert-types.ts:59
Classify crossing direction on a single bar. 'up' if previous bar
closed below the threshold and current bar's high crossed it;
'down' for the inverse. 'touch' when the threshold is within
the bar but the prior close doesn't establish a direction.
'miss' otherwise.
Parameters
prevBar
Bar | undefined
bar
threshold
number
Returns
"up" | "down" | "touch" | "miss"