MT5.ListOptions: List options of an underlying asset

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/Source_MT5.R

Description

Function to load all available options in MT5 of an underlying asset.

Only works in stock brokers.

Usage

1
2
3
4
5
MT5.ListOptions(
  sUnderlyingAsset,
  bUseDescriptionStrike = FALSE,
  bAutomaticHelpUnderlying = TRUE
)

Arguments

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 FALSE).

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 TRUE).

Value

Returns Data.frame [nx6], with follow informations:

Author(s)

Guilherme Kinzel, guikinzel@gmail.com

Trader_Patinhas (original MT5 block of code), MT5 Community Bio

References

https://en.wikipedia.org/wiki/Option_style

See Also

MT5.SymbolType()

Examples

 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)

Kinzel/mt5r documentation built on March 25, 2021, 9:57 p.m.