screamer.js
    Preparing search index...

    Function TripleBarrierOHLC

    • A three-state label over a window of OHLC bars: +1 when the upper barrier is reached first, -1 when the lower barrier is reached first, 0 when neither is reached within horizon bars; barriers are tested on each bar's open, high, and low.

      Parameters

      Returns ScreamerOp

    • A three-state label over a window of OHLC bars: +1 when the upper barrier is reached first, -1 when the lower barrier is reached first, 0 when neither is reached within horizon bars; barriers are tested on each bar's open, high, and low.

      Parameters

      • Optionalhorizon: number

        Bars after each entry in which a barrier can be reached. It is also the vertical barrier, and the delay of the output.

      • Optionalupper: number

        Distance of the upper barrier above the entry close, in barrier_unit. 0 turns it off.

      • Optionallower: number

        Distance of the lower barrier below the entry close, in barrier_unit. 0 turns it off. Below 1 with barrier_unit="fraction". With "price" or "vol", a lower level at or below 0 is never reached, so the barrier is off.

      • OptionalbarrierUnit: string

        Unit of upper and lower: "fraction" of the entry close (0.02 = 2%), "price" (an absolute amount), or "vol" (multiples of the volatility expected over the horizon).

      • OptionalvolSpan: number

        Span of the exponentially weighted standard deviation of one-step log returns of the close that sets the "vol" barriers. Must be greater than 1. Used only with barrier_unit="vol".

      Returns ScreamerOp