The scanner, like the backtester, adjusts dynamically to the amount of data available. Meaning, if you have 10 securities and 5 go back to 1987 and 5 only go back to 1995, the scan will start with the data that is available and then incorporate the other securities as it "reaches" them in time.
RSI - yes you can very easily create a composite based on that. As an example, this is the code for generating the number of stocks in an index that are above a 50 day moving average.
AboveAvg = Close > MA(Close,50);
Buy = 0; //We'll scan, but not buy
AddToComposite(AboveAvg,"~MyAboveAvgIndex50day", "C");
I could have just as easily said:
RSIbelow = RSI(14) < 30;
Buy = 0; //We'll scan, but not buy
AddToComposite(RSIbelow,"~MyBelowRSIIndex", "C");
This will create a new equity called ~MyBelowRSIIndex that will contain, over time, all the stocks in an index (or any watchlist) that have a RSI(14) below 30.
I could then reference this in a system as a buy/sell indicator.
fc = foreign("~MyBelowRSIIndex","C");
buy = fc > 90;//buy when a lot of stocks are below 30 on RSI
Hope this helps...
/d/
Quote from ronblack:
Thanks droskill for the info. A few questions: does the scan create the indicator based on the available historical data? What about if one security in the index has less data than the rest?
Can you also use things like RSI(x) in the scan?
Ron