Ticker

This object represents a single ticker symbol and any associated properties or transactions.

Properties:

Transactions (read-only)

Type: Collection of Transaction objects

Description: Collection of all transactions entered under this ticker.

 

CurrentHoldings (read-only)

Type: Collection of CurrentHoldings objects

Description: Collection of current holdings records for this ticker.  Current holdings are summary records that indicate an open position on a ticker at a given point in time.  They are created by applying transactions to a ticker.  See important notes below about this collection.

 

IntradayData (read-only)

Type: Collection of History objects

Description: Collection of intraday history data for this ticker.

 

HistoryData (read-only)

Type: Collection of History objects

Description: Collection of end of day history data for this ticker.

 

Tip: You can retrieve a subset of available data by setting the "HistoryStart" and "HistoryEnd" properties on the Ticker (using SetProperty) to appropriate date values object before getting the HistoryData property.  If there is a lot of history data in the database, this will make your script run a lot faster because the application doesn't have to load all of it.  This is also a good way to find out if there is historical data available for a particular date range.

 

ParentFolder (read-only)

Type: Folder

Description: Parent folder of this ticker, if the folder is nested, or Nothing if this ticker is not in a folder

Methods:

GetProperty(name)

name: String

Returns: Variant

 

Description: Get the named property for this ticker.  Property names are the same as the column names displayed in the Active Securities view in the software.

 

There are several additional special properties that can be requested

 

SetProperty(name, value)

name: String

value: Variant

 

Description: Set the named property for this ticker.  Property names are the same as the column names displayed in the Active Securities view in the software.  In addition, the special properties Visible, HistoryStart and HistoryEnd can be set using this method.

 

GetAssetClassPct(name)

name: String

Returns: Variant

 

Description: Gets the asset class percentage assigned to this ticker for the specified asset class name.  (Requires PSS 7.0.1 or later.)

 

InsertTransaction(object)

object: Transaction object

 

Description: Insert the given transaction into the transation register for this ticker.

 

RemoveTransaction(nIndex)

nIndex: integer

  

Description: Remove the transaction with the given index from the transaction register for this ticker.

 

DownloadHistoryData(dateStart, dateEnd)

dateStart : The starting date for which data is requested

dateEnd : The ending date for which data is requested

  

Description: Request historical data for this ticker for the specified dates.

 

DownloadIntradaydata(dateStart, dateEnd)

dateStart : The starting date for which data is requested

dateEnd : The ending date for which data is requested

  

Description: Request intraday data for this ticker for the specified dates.

Notes:

Historical data requests happen asynchronously.  When you request historical data, the function returns immediately and you will get an OnHistoryUpdated event callback.  You can register an event handler through the EventManager.

 

Clone()

Returns: Ticker object

 

Description: Clones the current ticker object, including all properties, transactions, and current holdings, and returns the cloned copy.  This copy is not attached to any document or folder.  This method is useful when manipulation of ticker properties or transactions is desired without affecting the existing document.

 

ApplyTransactionsToCurrentHoldingsUntil(date, callback)

date: Date

callback: PSSTransactionsHandler object (optional argument; requires PSS 7.1 or later)

 

Description: Because the current holdings records are built from transactions, this convenience function automatically iterates through transactions up to and including the specified date to build current holdings records.  This method is useful for determining the current holdings on a particular date.  Note: This method deletes the current holdings before applying transactions, so it is not necessary to call DeleteCurrentHoldings().

 

ApplyTransationToCurrentHoldings(transaction, callback)

transation: Transaction object

callback: PSSTransactionsHandler object (optional argument; requires PSS 7.1 or later)

 

Description: Applies a single transaction to the ticker, updating the current holdings as necessary.

 

DeleteCurrentHoldings()

Description: Deletes all current holdings records from the ticker.

Notes:

If you hold a reference to the CurrentHoldings collection when calling ApplyTransactionsToCurrentHoldingsUntil(), ApplyTransactionToCurrentHoldings(), or DeleteCurrentHoldings(), the collection becomes invalid and must be released.  Continuing to use the collection after calling one of these methods is likely to cause a fatal program error.

 

PSSTransactionsHandler

This class defines several methods that are called by the ApplyTransactionToCurrentHoldings and ApplyTransactionsToCurrentHoldingsUntil methods.  This handler makes it easy to determine when a transaction causes a change in position on a ticker, which is convenient for writing things like capital gains reports.  All methods are optional, so the absence of one or more methods will not generate an error.  (Requires PSS 7.1 or later)

 

OnCBAddHoldings(lot, transaction, shares)

lot: CurrentHoldings object

transaction: Transaction object

shares: decimal

 

Description: This method is called when the current holdings increase for the ticker.

 

OnCBSubtractHoldings(lot, transaction, shares)

lot: CurrentHoldings object

transaction: Transaction object

shares: decimal

 

Description: This method is called when the current holdings decrease for the ticker.

 

OnCBAddIncome(transaction)

transaction: Transaction object

 

Description: This method is called when income increases for the ticker.  (Does not affect current holdings.)

 

OnCBSubtractIncome(transaction)

transaction: Transaction object

 

Description: This method is called when income increases for the ticker.  (Does not affect current holdings.)

 

OnCBSplit(date, numerator, denominator)

date: Date

numerator, denominator: integer

 

Description: This method is called when a split transaction occurs.

 

OnCBShouldContinueProcessing(transaction)

transaction: Transaction object

 

Description: This method will be called to determine if processing should continue for the given ticker.