Sets the short ranking value. This function is generally used by a Portfolio Manager block as part of the instrument ranking process which is one way to select instruments for trading.  However it can be used in any script as shown where an instrument has context, or it can be used in any script when used in conjunction with a BPV Instrument Type using the procedures shown in Accessing System Portfolio Instruments

 

If you have three instruments in your portfolio A, B, and C.

In the Rank Instruments script you use the SetShortRankingValue function as follows:

For instrument A you set the short ranking value to 34.

For instrument B you set the short ranking value to 53

For instrument C you set the short ranking value to -12.

 

These will be sorted from highest to lowest.

 

Now in the Filter Portfolio script you can access the shortRank property:

Instrument A will have a short rank of 2.

Instrument B will have a short rank of 3.

Instrument C will have a short rank of 1.

 

Syntax:

instrument.SetShortRankingValue( rankingValue )

 

Parameter:

Description:

rankingValue

The short trade value to be used for ranking this instrument.

 

Example:

' Set the short ranking value.
instrument.SetShortRankingValue( rsi )

Returns:

The assigned RSI value assigned is available in the instrument.shortRankingValue property.  It can be used as a comparison sort value to change sequential order of the instruments in the portfolio when that type of process is needed.

 

Links:

Accessing System Portfolio Instruments, Ranking Functions, Ranking Properties

See Also:

 

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 558

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software