QuoteFieldValue (Function)
The QuoteFieldValue function returns the value of a user-specified numeric quote field (Bid, BidSize, etc.) for a user-specified symbol. It uses a QuotesProvider object to obtain a quote for a symbol that does not need to be on the chart or a symbol other than the current RadarScreen row being evaluated.
Syntax
QuoteFieldValue( SymbolString, QuoteField, oDataState )
Returns (Integer)
The QuoteFieldValue function itself returns the numeric value of the requested quote or a value of 0 if none is found. The oDataState output parameter returns the load state of the QuotesProvider object used to read the quote data.
This function displays an error message when trying to request a string, Boolean, or DateTime quote field.
Parameters
Name |
Type |
Description |
SymbolString |
String |
The symbol for which you are requesting a quote value. |
QuoteField |
String |
The name of the quote field (see QuoteFields for a list). |
oDateState |
Numeric |
Outputs the data state of the object used to read quotes (unloaded=0, loaded=2, loading=1, failed=3). |
Remarks
See Multiple Output Function for more information on using output parameters to return values.
Example
Gets the AskSize for the current Ask for MSFT (Microsoft).
var: oDataState(0);
Value1 = QuoteFieldValue("MSFT", "AskSize", oDateState);
Value2 = oDataState;