factory | R Documentation |
Helper functions that simplify the customization of common data structures.
IBContract(...)
IBOrder(...)
fCondition(type)
... |
Any combination of named arguments whose names are valid for
|
type |
Type of condition: one of |
The same result is achieved by making a copy of the respective structures and explicitly reassigning values to the desired fields. The two approaches can be complementary.
IBContract
returns a Contract
.
IBOrder
returns an Order
.
fCondition
returns a Condition
.
Contract
, Order
.
stock <- IBContract(symbol="GOOG", secType="STK", exchange="SMART", currency="USD")
# Equivalent to
stock <- Contract
stock$symbol <- "GOOG"
stock$secType <- "STK"
stock$exchange <- "SMART"
stock$currency <- "USD"
order <- IBOrder(action="BUY", totalQuantity=10, orderType="LMT", lmtPrice=99)
condition <- fCondition("Time")
condition$is_more <- TRUE
condition$value <- "20221114-12:00"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.