StaticVarGenerateRanks in reverse

How do I get the ranking in reverse order?

A quote from Tomasz reply:

... to get ranks from bottom, you just subtract the rank from quantity.

https://www.amibroker.com/guide/h_ranking.html
https://www.amibroker.com/guide/afl/staticvargenerateranks.html
Separate ranks for categories that can be used in backtesting

ok, a bit of an ad-hook way, which I already did but thank you for your answer.

Well, you could just reverse the order of the values that you're ranking on as well. The best way to do that would depend on what the initial values are. As a simple example, if you wanted to rank from lowest to highest value of an oscillator with initial values between 0 and 100 (like RSI) you could rank on either 100-value or 1/value.