Details of variables

There is a variable "Positionscore" that I would like to learn to use, but the settings shown are puzzling. It is listed in the table of variables which refers me to an example elsewhere in the manual that reads:

PositionScore = 100-RSI(); // prefer stocks that have low RSI;

I do not understand why "100-RSI()" means low RSI and so I am not sure how to use the variable for my own scoring of candidate trades. What if I want to find the highest RSI or some other indicator?

More generally, I would like to know where I can find explanations for the details of such code variables. For instance, the manual makes very clear the code for "Optimize"...

variable = optimize( "Description", default, min, max, step );

...and includes an explanation of each of the terms in the parenthetic phrase.

Is there a "master" list of all code variables that provides that sort of clarity for all variables - such as for PositionScore? I have done a search through the manual for "PositionScore" and though it shows up several times, there is no detailed explaination as there is for "Optimize". Is there a better source?

Thanks for any clues

@JohnHoward, from this page:

The first kind of ranking is performed automatically if your trading system formula defines PositionScore variable. You can use PositionScore variable to decide which trades should be entered if there are more entry signals on different securities than maximum allowable number of open positions or available funds.
In such case AmiBroker will use the absolute value of PositionScore variable to decide which trades are preferred.

The last line explains all you need to know about PositionScore. In your formula you can use any calculation to assign a value to this reserved variable: for instance 100-RSI() will result in selecting a ticker with a RSI() == 30 vs. another one with a RSI() == 70 (since 100 - 30 > 100 -70).
PositionScore = ROC(C, 20); will select the stocks with the best ROC in the last 20 periods, etc.

The "reserved variables" are summarized here. (3/4 down the page).

If you search this forum for "PostionScore" you'll find additional examples of calculations to determine its value.

1 Like

beppe,

Thank you very much (once again).

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.