Description Usage Arguments Details Value Note Author(s) See Also Examples
Creates a twsContract object, and slot in the corresponding instrument, and places the object in the slot.
1 2 3 |
symbols |
vector of character names of FinancialInstrument instruments |
sectype |
type of security |
exch |
exchange |
primary |
primary exchange of security |
expiry |
expiry |
strike |
strike price |
currency |
requested currency |
right |
right |
local |
local security name |
multiplier |
contract multiplier |
include_expired |
should expired contracts be included |
conId |
IB contract ID |
This is an old function that is not terribly useful anymore. It should probably be deprecated It is essentially a wrapper for twsContract, but it doesn't check to make sure the twsContract is valid.
The instrument must be defined before calling this function.
adds twsInstrument class to the instrument
Called for it's side effect
TODO: create instrument if it doesn't already exist
Garrett See
see instead: twsInstrument
twsContract, instrument
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
currency('USD')
stock('XOM','USD',1)
addIBslot('XOM')
# This is BETTER:
stock("CVX","USD")
instrument_attr("CVX","IB",getContract("CVX"))
# the above will add the twsInstrument class
# if you have FinancialInstrument version 0.7.2 or greater
# So is this:
twsInstrument(stock("BP","USD")) #will update other details of instrument by default
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.