MT5.ListOptions.Rd
Function to load all available options in MT5 of an underlying asset.
Only works in stock brokers.
MT5.ListOptions( sUnderlyingAsset, bUseDescriptionStrike = FALSE, bAutomaticHelpUnderlying = TRUE )
sUnderlyingAsset | character(); target underlying asset (e.g. for "PETR4" should be used "PETR"). |
---|---|
bUseDescriptionStrike | bool; use strike given in symbol description. Some brokers do not adjust the prices following the dividends. Totally optional (experimental). (default |
bAutomaticHelpUnderlying | bool; it will try to help the user to only send the underlying asset to mt5R. It will convert "PETR4" to "PETR" automatically (default |
Returns Data.frame \([nx6]\), with follow informations:
sOpt {character}
: options symbol.
PN_ON {int}
: 0 for preferential stocks, 1 otherwise.
Type {factor}
: options type. "CALL" for call options, "PUT" for put options.
Mod {factor}
: option style. "AMERICAN" or "EUROPEAN". See references.
Strike {numeric}
: options strike.
Expiration {Date}
: options expiration.
https://en.wikipedia.org/wiki/Option_style
if (FALSE) { ## Get all available options of PETR4 and PETR3 (Petroleo Brasileiro S.A. - Petrobras PBR:NYSE) MT5.ListOptions("PETR") ## Other examples MT5.ListOptions("VALE") MT5.ListOptions("USIM") }