Learn R Programming

IKTrading (version 1.0)

osMaxDollar: Order Size: Max Dollar

Description

An order sizing function that limits position size based on dollar value of the position, rather than quantity of shares.

Usage

osMaxDollar(data, timestamp, orderqty, ordertype,
    orderside, portfolio, symbol, prefer = "Open",
    tradeSize, maxSize, integerQty = TRUE, ...)

Arguments

tradeSize
the dollar value to transact (use negative number to sell short)
maxSize
the dollar limit to the position (use negative number for short side)
integerQty
a boolean whether or not to truncate to the nearest integer of contracts/shares/etc.

Value

a quantity to order