Position.Priority: minus operator
Author: akardar1
Creation Date: 10/1/2009 7:35 AM
profile picture

akardar1

#1
Hi Eugene, Cone,

I am trying to set a priority property, where
A lowest RSI value is given a priority when my trend filter is bullish; and when
the highest RSI value is given priority when my trend filter is bearish.

The user guide example as per page 91 shows:

CODE:
Please log in to see this code.


How is the minus operator being used here?
have you overloaded the operator to return the lowest RSI (for buying) in the series?
If so, does the plus operator return the highest value in the series?

Adrien
profile picture

Eugene

#2
Hi Adrien,

The minus operator is simply used to invert the RSI value at the current bar with the opposite sign. Thus, when the capital isn't enough to take all signals, Wealth-Lab will prefer the signals with lowest RSI value - as opposed to its default behavior of picking the highest priority values. An example of doing the opposite thing can be found in "How to: Obtain Worst-Case Backtest Results".
profile picture

akardar1

#3
Understood, thanks Eugene
profile picture

akardar1

#4
In theory - would be be possible to prioritize based on a "correlation matrix "?
Prioritizing positions with lower correlation relative to open positions ?
profile picture

Eugene

#5
Correlation is included in Community.Indicators, so you might want to try it.
profile picture

jcranwellward

#6
Eugene,

If I wanted to build a correlation matrix on every entry signal to compare the correlation of the symbol I get my signal from with with each ticker in my open positions, the aim would be to 1) reject entry signals that have a high correlation with open positions 2) enable us to set priority for new positions. Would I perform something similar to this to build the matrix:

CODE:
Please log in to see this code.


Does wealth lab have a built in way to perform this, I have heard of CorrelationTable 1.1, is this a WL 4 feature?

Thank you for your help,

James
profile picture

Eugene

#7
James,

Re: Correlation Table 1.1 - yes, this is a WL4 include script (which logic you can analyze and rewrite for V5 - it's pretty obvious).

Essentially, your pseudocode is about making the same thing.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).