I am trying to backtest strategy on EOD data on 100s of stock. The strategy should select 4 stocks from the list with the lowest RSI indicator, i.e. scan all stocks in the lists and then buy only 4 stocks with the lowest RSI.
My struggle is that the strategy analyzer goes instrument by isntrument. Takes first instrument and runs it through the script through whole time frame then moving to another instrument. This way I cannot select those with lowest RSI on that particular day as the strategy analyzer takes only one instrument on that day before moving to the next day. I would rather need to go day by day. Take all instruments on the first day, select instruments with lowest RSI then move to the next day.
Would you have an example of a similar script? I searched the forum with no success.
Thank you
Michal
Comment