GetRTDataForeign
- retrieves the real-time data fields (for specified symbol)

Miscellaneous functions
(AFL 2.80)


SYNTAX GetRTDataForeign( ''fieldname'' , ''symbol'' )
RETURNS NUMBER
FUNCTION This function is similar to GetRTData but allows to specify symbol OTHER than currently selected and it is much faster than SetForeign/GetRTData combo.

The function retrieves the LAST (the most recent) value of the following fields reported by streaming real time data source for specified symbol:

  • "Ask" - current best ask price
  • "AskSize " - current ask size
  • "Bid" - current best bid price
  • "BidSize " - current bid size
  • "52WeekHigh" - 52 week high value
  • "52WeekHighDate" - 52 week high date (in datenum format)
  • "52WeekLow" - 52 week low value
  • "52WeekLowDate" - 52 week low date (in datenum format)
  • "Change" - change since yesterdays close
  • "Dividend" - last dividend value
  • "DivYield" - dividend yield
  • "EPS" - earnings per share
  • "High" - current day's high price
  • "Low" - current day's low price
  • "Open" - current day's open price
  • "Last" - last trade price
  • "OpenInt" - current open interest
  • "Prev" - previous day close
  • "TotalVolume" - total today's volume
  • "TradeVolume" - last trade volume
  • "ChangeDate" - datenum (YYYMMDD) of last data change
  • "ChangeTime" - timenum (HHMMSS) of last data change
  • "UpdateDate" - datenum (YYYMMDD) of last data update
  • "UpdateTime" - timenum (HHMMSS) of last data update
  • "Shares" - total number of shares

Note 1: this function is available ONLY in PROFESSIONAL edition, calling it using Standard edition will give you NULL values for all fields

Note 2: works only if data source uses real time data source (plugin)

Note 3: availablity of data depends on underlying data source - check the real-time quote window to see if given field is available

Note 4: function result represents the current value at the time of the call /formula execution/, and they will be refreshed depending on chart or commentary refresh interval /settable in preferences/. Built-in real time quote window is refreshed way more often (at least 10 times per second)

EXAMPLE "Bid = "+GetRTDataForeign("Bid");
"Ask = "+GetRTData("Ask");
"Last = "+GetRTData("Last");
"Vol = "+GetRTData("TradeVolume");

"EPS = "+GetRTDataForeign("EPS", "AAPL");
"52week high = "+GetRTDataForeign("52weekhigh", "MSFT");
SEE ALSO GetRTData() function , SetForeign() function

References:

The GetRTDataForeign function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference