This function ranks the instrument by long sorting value and short sorting value. This replicates the action taken between the Portfolio Manager's Rank Instruments script and the Filter Portfolio script.

 

Syntax:

system.RankInstruments()

 

Parameter:

Description:

No parameters

 

 

Returns:

 

 

Example:

Can be used in the Before Trading Day script as a more flexible replacement for the Portfolio Manager. Do a manual loop over the instruments setting the Ranking Values, and then use system.RankInstruments, and then do another manual loop over the instruments allowing and denying trading based on the resultant Rank.

 

Note that this only ranks the instruments to create a Long Rank and a Short Rank. To physically sort the instrument list to change the order in which they are looped over for order processing, use the system.sortInstrumentList function.

 

Links:

 

See Also:

system.sortInstrumentList

 


Edit Time: 9/20/2017 08:08:58 AM


Topic ID#: 486

 

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