Script tracks the volume of futures contracts which are not expired for the current and next year. Provides a label at the real-time bar and when a different contract has higher volume in the last bar of the timeframe input as long as it is different from the current ticker. It should display on continuous and lower volume contract charts.
Intended to be used with a higher timeframe input.
Currently supports ES, MES, NQ, MNQ, RTY, M2K, YM, MYM, BTC, MBT, CL, MCL, GC, MGC, E7 and J7. If you'd like to add your own, then include the syminfo.root of your ticker and the appropriate month codes for that contract in the validMonthCodes switch list.