Can backtest buy or sell stocks based on rankings from prior week, 2 weeks ago, etc?

I would like to examine the results from buys and sells being determined by the rankings from the past. If I am reallocating today, I want to use the rankings from, for example, 2 weeks ago. Is that possible?

thanks in advance

Steven,

Try the RankPrev() rule.

For example in a buy rule; Rank > RankPrev(2), will only buy a stock if its current rank value is greater than 2 weeks ago.
As a sell rule; Rank < RankPrev(2), will sell a stock if its rank value is less than 2 weeks ago.

I have used Rank < RankPrev(1) -1 so that it won’t sell a stock that had a very small reduction in rank.

I can work with that, thanks Denny!