Interface OROProps<T>

One Replace Other. Used Alpaca limit order type

interface OROProps<T> {
    lossLimitPrice?: T;
    lossStopPrice: T;
    lossStopPriceMax?: T;
    lossStopPriceMin?: T;
    position: T;
    priceType?: PositionHandlerPriceType;
    profitLimitPrice: T;
    profitLimitPriceMax?: T;
    profitLimitPriceMin?: T;
    triggerPrice?: T;
    triggerPriceType?: PositionHandlerPriceType;
    type: ORO | OCOEmulation;
}

Type Parameters

Properties

lossLimitPrice?: T

Loss limit price for order. If triggerPriceType='custom' then dollars else percentage

auto calculated, slightly lower bid price
lossStopPrice: T

If bidPrice is upper or equal to this price, then the order limit price will replaced with profitLimitPrice else to lossLimitPrice. If triggerPriceType='custom' then dollars else percentage

lossStopPriceMax?: T

Maximum value for lossLimitPrice prop. If lossLimitPrice greater than lossStopPriceMax, then lossLimitPrice value will be replaced on the lossStopPriceMax

lossStopPriceMin?: T

Minimum value for lossLimitPrice prop. If lossLimitPrice less than lossStopPriceMin, then lossLimitPrice value will be replaced on the lossStopPriceMin

position: T

Percentage of position to use.

Which price to use for calculation.

profit: 'boughtAverage', loss: 'positionAverage'

profitLimitPrice: T

Profit price for order. If triggerPriceType='custom' then dollars else percentage

profitLimitPriceMax?: T

Maximus value for profitLimitPrice prop. If profitLimitPrice greater than profitLimitPriceMax, then profitLimitPrice value will be replaced on the profitLimitPriceMax

profitLimitPriceMin?: T

Minimum value for profitLimitPrice prop. If profitLimitPrice less than profitLimitPriceMin, then profitLimitPrice value will be replaced on the profitLimitPriceMin

triggerPrice?: T

Which price activates the rule.

auto calculated.
triggerPriceType?: PositionHandlerPriceType

which price to use for calculation.

profit: 'boughtAverage', loss: 'positionAverage'

Type of strategy