FundValueTTM (Function)
The FundValueTTM calculates the trailing twelve month (TTM) sum of a user-selected fundamental field.
Syntax
FundValueTTM(FundField,oErrorCode,oNewData)
Returns (Integer)
The function returns the sum over the training twelve month (TTM) period of a specified fundamental data field . The oErrorCode output parameter returns a status code for the fundamental data request that should be checked after each use of FundValueTTM to verify that the data was retrieved without error. The output parameter oNewData returns true is the sum includes data not on the immediately preceding bar.
Parameters
|
Name |
Type |
Description |
|
FundFieldName |
String |
Specifies the short name of the fundamental data to read. |
|
oErrorCode |
Numeric |
Outputs the status of the fundamental data request. If no error occurred a constant value of fdrOK is returned, otherwise a specific error code is set. See reserved word GetLastFundDataError for a list of error codes. |
|
oNewData |
Boolean |
Outputs true if the TTM sum includes fundamental data that was not available on the immediately preceding bar, otherwise false. |
Remarks
Fundamental data names are listed in tables under the following categor
All units, except share values, are converted to Millions
for all periods. Percentages are returned as whole values (i.e.
a value of 26.5 represents 26.5% and not 2650.00%)
See About Fundamental Data in TradeStation for more information about using the fundamental data as part of your fundamental analysis.
See Multiple Output Function for more information on using output parameters to return values.
Example
Assigns Value1
the numeric value of trailing twelve month sum of fundamental data
vars: RetError(-1), NewDataTF(false);
Value1 = FundValueTTM(