Typically if there is contango between 1! and 2! correct me if I'm wrong, I think there is also between 2! and "3!".
You might want to long 1! current contract on a broker with no interest, short 2! on one with.
In this case would have to check "!3" but this script doesn't do this so it will be manual. And the opposite for backwardation.
This script goal is just to be a convenient way to quickly cycle through a watchlist of and see if there is anything out of the ordinary.
The gap is divided by the ATR 500 which is more relevant than just a percentage or dollar number and easier to spot when checking many etc.