screamer.js
    Preparing search index...

    Interface BacktestOHLCVTargetOptions

    The settings of BacktestOHLCVTarget by name, for BacktestOHLCVTarget({ ... }).

    interface BacktestOHLCVTargetOptions {
        delay?: number;
        feePerContract?: number;
        fillAt?: string;
        initialCapital?: number;
        maxParticipation?: number;
        maxPosition?: number;
        minPosition?: number;
        multiplier?: number;
        rebalanceBand?: number;
        size?: string;
        slippage?: number;
        slippageUnit?: string;
        stopLoss?: number;
        takeProfit?: number;
        takerFee?: number;
        tickSize?: number;
        trailingStop?: number;
    }
    Index
    delay?: number

    Bars between the decision and the execution. A target from bar t trades on bar t + delay. 0 is allowed only with fill_at="close" (market-on-close of the signal bar).

    1

    feePerContract?: number

    Fixed fee (or rebate when negative) charged per contract on each fill.

    0.0

    fillAt?: string

    Reference price of the execution bar: "open", "close", "typical" (high + low + close) / 3, or "ohlc4" (open + high + low + close) / 4.

    "open"

    initialCapital?: number

    Starting capital for size="weight" and for rebalance_band; equity is initial_capital plus the backtest's cumulative pnl.

    0.0

    maxParticipation?: number

    The most an order may trade on one bar, as a share of the bar's volume (0.1 = 10%). The rest carries to the next bars.

    1.0

    maxPosition?: number

    Upper bound on the position, in units. It applies after size has converted the target to units, so a weight target of 2 with max_position=0.5 holds 0.5 units. The default, inf, is no bound.

    Infinity

    minPosition?: number

    Lower bound on the position, in units. It applies after size has converted the target to units, so a weight target of -2 with min_position=-0.5 holds -0.5 units. The default, -inf, is no bound.

    -Infinity

    multiplier?: number

    Contract multiplier applied to mark-to-market PnL, fill slippage, and proportional fees.

    1.0

    rebalanceBand?: number

    With size="notional" or "weight", recompute the units when the holding drifts from the target by more than this fraction of equity (0.05 = 5 points of weight). 0 keeps the units until the target value changes.

    0.0

    size?: string

    How to read the target: "units" (a position), "notional" (a currency amount), or "weight" (a fraction of initial_capital + equity). It is converted to units at the execution price.

    "units"

    slippage?: number

    Adverse price offset on every taker (market) fill, read in slippage_unit. A buy fills higher and a sell lower; resting limit fills never slip.

    0.0

    slippageUnit?: string

    Unit of slippage: "fraction" of the reference price (5 bps = 5e-4), "ticks" of tick_size, or "price" (an absolute amount).

    "fraction"

    stopLoss?: number

    Exit when the price moves this fraction against the average entry fill (0.05 = 5%). 0 turns it off.

    0.0

    takeProfit?: number

    Exit when the price moves this fraction in favor of the average entry fill. 0 turns it off.

    0.0

    takerFee?: number

    Fractional fee charged on a market (taker) fill at the open.

    0.0

    tickSize?: number

    Instrument price grid (0 = continuous). Slippage offsets round up to whole ticks; the "ticks" slippage unit counts in this step.

    0.0

    trailingStop?: number

    Exit when the price falls this fraction from the best price since entry (the highest for a long, the lowest for a short). 0 turns it off.

    0.0