Description Usage Arguments Value Author(s) References See Also Examples
Function to load all available options in MT5 of an underlying asset.
Only works in stock brokers.
1 2 3 4 5 | 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.
Guilherme Kinzel, guikinzel@gmail.com
Trader_Patinhas (original MT5 block of code), MT5 Community Bio
https://en.wikipedia.org/wiki/Option_style
1 2 3 4 5 6 7 8 9 10 | ## Not run:
## 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")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.