|
swalk10
2010-06-19 20:42:16
|
|
Perhaps I have missed this, but I can't seem to locate a percent rank function. Could you please help indicate the appropriate code.
That is, I need to create a function that transforms any vector array into a percent rank array.
For example, I need to look at the last 200 bar of the closing price, and for each bar, know what % that bar's closing price is within the prior 200 bars
(so, a price of 110, if it were the high of last 200 bars would be 100, if the low, it would be 0, etc.).
Typically, the function would be called as X = PERCENTRANK(CLOSE, 200);
Of course, variable close could be swapped for any other variable.
Also, could you kindly show how I would "call" this function within your other features (ranking systems, simulator, etc.)
Thanks - hopefully I can then use this as a learning step also.
|
|