screamer.js
    Preparing search index...

    Interface BacktestPortfolioOHLCTargetOptions

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

    interface BacktestPortfolioOHLCTargetOptions {
        delay?: number;
        fee?: number | number[];
        feePerContract?: number | number[];
        fillAt?: string;
        initialCapital?: number;
        maxGross?: number;
        maxNet?: number;
        multiplier?: number | number[];
        rebalance?: string;
        rebalanceBand?: number;
        size?: string;
        slippage?: number | number[];
        slippageUnit?: string;
        tickSize?: number | number[];
    }
    Index
    delay?: number

    Bars between the bar a target is decided on (at its close) and the bar it executes on. 0 needs fill_at "close".

    1

    fee?: number | number[]

    Fractional fee on the traded notional, one value for all assets or one per asset.

    [0.0]

    feePerContract?: number | number[]

    Fixed fee per contract traded, one value for all assets or one per asset.

    [0.0]

    fillAt?: string

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

    "open"

    initialCapital?: number

    Starting capital. Portfolio equity is this plus the summed pnl of all assets; weights are fractions of it.

    1.0

    maxGross?: number

    Largest gross exposure, sum of absolute position values over equity. Orders that exceed it are scaled down. The default, inf, is no cap.

    Infinity

    maxNet?: number

    Largest absolute net exposure, sum of position values over equity. Orders that exceed it are scaled down. The default, inf, is no cap.

    Infinity

    multiplier?: number | number[]

    Contract multiplier per asset, applied to pnl, notional, and proportional fees.

    [1.0]

    rebalance?: string

    When the band trips: "drifted" trades only the assets beyond it, "all" rebalances every asset that has a target.

    "drifted"

    rebalanceBand?: number

    Trade a held asset back to its target when its holding drifts from it by more than this fraction of equity (0 = never). Needs size "weight" or "notional".

    0.0

    size?: string

    What a target means: "weight" (a fraction of portfolio equity), "notional" (a currency amount), or "units" (a position).

    "weight"

    slippage?: number | number[]

    Adverse price offset on every fill, read in slippage_unit, one value for all assets or one per asset.

    [0.0]

    slippageUnit?: string

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

    "fraction"

    tickSize?: number | number[]

    Price grid per asset (0 = continuous). Slippage offsets round up to whole ticks.

    [0.0]