GetRTData
- retrieves the real-time data fields

Miscellaneous functions
(AmiBroker 4.60)


SYNTAX GetRTData(''fieldname'')
RETURNS NUMBER
FUNCTION Retrieves the LAST (the most recent) value of the following fields reported by streaming real time data source:

  • "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 = "+GetRTData("Bid");
"Ask = "+GetRTData("Ask");
"Last = "+GetRTData("Last");
"Vol = "+GetRTData("TradeVolume");

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

References:

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

More information:

See updated/extended version on-line.