Position priority defines the way signals are selected every day to be sent to execution. Assuming on a specific day, the strategy issues 20 signals each with a buying value of $10,000. Now, let’s say that the portfolio budget is $100,000 (defined in Portfolio Capital), this means that we can only issue 10 orders, the other 10 of the 20 signals will not be send for trading and will be ignored.
How do we tell the system, which signals to select and which ones to ignore?
The system select signals based on the Symbols mention in it. So out of the 20 signals only 10 signals with preferred Symbols will be sent to execution. How the system select the preferred symbols?
We need to define it. We do it using the Symbol Power field in the Universe (introduced in last blog post). This means that we can define a Power or Rank (simply a number) that will be used by the system to select Symbols.
For example, let’s say that symbols with higher Power (or number) are selected first (we call this “Power Descending” Criteria). In the above example the system will select the 10 signals of the 10 symbols with highest Power/Rank. We can do vis-a-versa and select the 10 lowest Power symbols (or “Power Ascending” Criteria).
Now, how do we define the Power or Rank of every symbol in our universe? We can do it manually (too tiring) or we can develop a “filtering strategy” that will do it for us. In our previous post, we explain how to do it. You may also find few sample in our Strategy Public Library (you must login first) in Strategies menu.
The following example shows a strategy that set the symbol rank with a value of SMA(200) of the symbol. This means that if we do Power Descending processing, the system will select signals with symbols of highest SMA(200) first.
# Sample Filtering Strategy
# Obtain global parameter - $counter
my $maxI = MaxIndex(); # max bars in the period
my $currI = CurrentIndex() + 1; # current bar
my $sec = GetSecurityName();
if( $currI == $maxI )
# Add the current Symbol stored in $sec with its SMA(200) power value.
# The new universe name is TestUniverse and its belog to user "user"
Add2Universe( "user" , "TestUniverse" , $sec , SMA(200) );
Now, we only need to define in the strategy which Position Priority way we want to use. This will be used in the Marketplace calculations (when the system select signals to build strategy statistics for our private or public marketplace) and in the Today menu - generating our daily signals:
Go to Strategy Edit or Add new strategy and choose one of the following options for Position Priority:
1. None (the default).
2. Power Descending
3. Power Ascending
Have a great Trading Day,
Strategy Seeker Team!