Disclaimer not my code. I was looking to get help to convert this code to 2017 trading and to QC from QT. 

Author