MT5.SymbolType.Rd
This function is useful to know what kind of asset target symbol is.
It can be used for several symbols at once using a character vector.
This function will automatically manage if the sSymbol
is in marketwatch. Not advisable for huge vectorized uses, use a loop instead for safer handling.
MT5.SymbolType(sSymbol)
sSymbol | character(); target symbols. |
---|
Returns int
vector, with follow information:
-1: not found
0: stock
1: options
2: future contracts
3: Forex
4: CFD
if (FALSE) { MT5.SymbolType("EURUSD") ## Returns # 3 MT5.SymbolType(c("CADJPY", "UK Oil")) ## Returns # 3 4 }