OPEN-SOURCE SCRIPT
Telah dikemas kini

Highest Volume Futures

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.
Nota Keluaran
Adjusted label offset to be a multiplier of the highest value instead of an added integer.
Nota Keluaran
Corrected comment on input.
Nota Keluaran
Removed request.security calls to check expiration dates on next years contract which was causing excessive request.security calls on futures with monthly contracts.
Nota Keluaran
Updating chart; no functional changes to script.

Penafian