Take a peek at the CSVtoHistory script, it should point you in the right direction.

Given the DTC implementation, it is not realistic to try to output continuous contracts from the plugin. The SC staff told me finding futures symbols by underlying is on their to-do list, but they never got around to it.